Skip to main content

decompose

Function decompose 

Source
pub fn decompose(m: Mat4) -> ([f32; 3], Quat, [f32; 3])
Expand description

Decompose a column-major affine matrix into translation, a unit rotation quaternion, and per-axis scale: the inverse of compose for a positive-scale T * R * S matrix. Scale is recovered as the length of each rotation column; a zero-length column yields a zero scale axis and the rotation falls back to identity for that axis.