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