Skip to main content

is_rotation_matrix

Function is_rotation_matrix 

Source
pub fn is_rotation_matrix(t: &[f64]) -> bool
Expand description

Whether t is a 3x3 rotation matrix: nine values whose determinant has magnitude 1 (within 0.005).

Mirrors _is_rotation_matrix in the Python mol-view-spec builder, including its use of |det|. The determinant is the same for row- and column-major order, so either layout is accepted.