macro_rules! mat4_raw {
($($e:expr),*) => { ... };
}Expand description
Macro for creating a 4x4 matrix (Mat4) using a concise syntax.
§Syntax
The mat4_raw! macro creates a Mat4 from a 2D array.
§Notes
- The macro internally uses the
from_matfunction to create the matrix. - Ensure that the provided expressions are suitable for initializing a 4x4 matrix.
§Example
let mat = mat4_raw![[1, 2, 3, 4], [8, 7, 6, 5], [9, 10, 11, 12], [16, 15, 14, 13]];
assert_eq!(mat, Mat4::from_mat(&[[1, 2, 3, 4], [8, 7, 6, 5], [9, 10, 11, 12], [16, 15, 14, 13]]));