macro_rules! vec2 {
($($arg:expr),* $(,)?) => { ... };
}Expand description
Creates a [Simd] vector2 from two elements.
Also accepts vectors as arguments, as long as they contain exactly two elements in total. If only a single element is provided, it will be repeated across all elements.
ยงExamples
use ggmath::{Vec2, vec2};
let v: Vec2<f32> = vec2!(1.0, 2.0);
let v: Vec2<f32> = vec2!(vec2!(1.0, 2.0));
let v: Vec2<f32> = vec2!(1.0);