Expand description
Calculates the determinant of this matrix.
let m = Mat2::<i32>::from_slice(&[1, 2, 3, 4]);
assert_eq!(m.det(), -2);
Invert this matrix.
If this matrix is not invertible, this method returns false and the matrix is unchanged.
let mut m = <Mat2>::from_slice(&[1., 2., 3., 4.]);
assert!(m.invert());
assert_eq!(*m.as_ref(), [-2., 1., 1.5, -0.5]);