Macro euler::mat3[][src]

macro_rules! mat3 {
    () => { ... };
    ($expr:expr) => { ... };
    (
        $m00:expr, $m01:expr, $m02:expr,
        $m10:expr, $m11:expr, $m12:expr,
        $m20:expr, $m21:expr, $m22:expr,
    ) => { ... };
}

Single-precision 3x3 matrix macro constructor.

Examples

Identity

let empty = mat3!();
assert_eq!(
    empty.as_ref(),
    &[
        [1.0, 0.0, 0.0],
        [0.0, 1.0, 0.0],
        [0.0, 0.0, 1.0],
    ]
);

Full

let full = mat3!(
    0.1, 0.2, 0.3,
    0.4, 0.5, 0.6,
    0.7, 0.8, 0.9,
);
assert_eq!(
    full.as_ref(),
    &[
        [0.1, 0.2, 0.3],
        [0.4, 0.5, 0.6],
        [0.7, 0.8, 0.9],
    ]
);