Macro mat2_raw

Source
macro_rules! mat2_raw {
    ($($e:expr),*) => { ... };
}
Expand description

Macro for creating a 2x2 matrix (Mat2) using a concise syntax.

§Syntax

The mat2_raw! macro creates a Mat2 from a 2D array.

§Notes

  • The macro internally uses the from_mat function to create the matrix.
  • Ensure that the provided expressions are suitable for initializing a 2x2 matrix.

§Example

let mat = mat2_raw![[1, 2], [4, 3]];

assert_eq!(mat, Mat2::from_mat(&[[1, 2], [4, 3]]));

§See Also

  • Mat2: The 2x2 matrix type used by this macro.
  • from_mat: Function to construct a matrix from a 2D array of elements.