Trait glm::GenSquareMat
[−]
[src]
pub trait GenSquareMat<T: BaseFloat, C: GenFloatVec<T>>: GenMat<T, C, R = C, Transpose = Self> + One { fn determinant(&self) -> T; fn inverse(&self) -> Option<Self>; }
Generic type of square matrix.
Required Methods
fn determinant(&self) -> T
Returns the determinant of a square matrix.
Example
use glm::GenSquareMat; let mat = glm::mat2(1., 3., 2., 4.); assert_eq!(mat.determinant(), -2.);
fn inverse(&self) -> Option<Self>
Returns the inverse matrix of a square matrix, or None
if the
matrix is not invertible.