macro_rules! dmat2 { () => { ... }; ($expr:expr) => { ... }; ( $m00:expr, $m01:expr, $m10:expr, $m11:expr, ) => { ... }; }
Expand description
Double-precision 2x2 matrix macro constructor.
Examples
Identity
let empty = dmat2!();
assert_eq!(
empty.as_ref(),
&[
[1.0, 0.0],
[0.0, 1.0],
]
);
Full
let full = dmat2!(
1.2, 3.4,
5.6, 7.8,
);
assert_eq!(
full.as_ref(),
&[
[1.2, 3.4],
[5.6, 7.8],
]
);