Macro adi_gpu_base::mat2[]

macro_rules! mat2 {
    (  ) => { ... };
    ( $ expr : expr ) => { ... };
    (
$ m00 : expr , $ m01 : expr , $ m10 : expr , $ m11 : expr , ) => { ... };
}

Single-precision 2x2 matrix macro constructor.

Examples

Identity

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

Full

let full = mat2!(
    1.2, 3.4,
    5.6, 7.8,
);
assert_eq!(
    full.as_ref(),
    &[
        [1.2, 3.4],
        [5.6, 7.8],
    ]
);