Macro mathru::matrix [−][src]
macro_rules! matrix {
($($($x : expr), *) ; *) => { ... };
}
Expand description
Macro to construct matrices
use mathru::algebra::linear::Matrix;
// Construct a 2x3 matrix of f32
let mat: Matrix<f32> = matrix![1.0, 2.0, 3.0; 4.0, 5.0, 6.0];
let (m, n) = mat.dim();
assert_eq!(m, 2);
assert_eq!(n, 3);