Function glm::ext::trace
[−]
[src]
pub fn trace<F: BaseFloat, C: GenFloatVec<F>, M: GenSquareMat<F, C>>(m: &M) -> F
Returns the trace of a square matrix m
.
Example
use glm::mat2; use glm::ext::trace; let m2 = mat2(1., 3., 2., 4.); assert_eq!(trace(&m2), 5.);