[−][src]Macro definitive::vector
Create a vector out of named arguments
First token is the length of the Vector
, so vector! { 4 }
is a Vec4
After the length you can use x
, y
, z
, w
and s
, t
, u
, v
to
define the 1st, 2nd, 3rd and 4th elements, respectively. Remaining fields
are filled with Default::default
Example
use definitive::{Vector, vector}; assert_eq!( vector! { 4, y: 2, z: 3 }, Vector::from([0, 2, 3, 0]) );