rustgd / cgmath

A linear algebra and mathematics library for computer graphics.
https://docs.rs/cgmath
Apache License 2.0
1.12k stars 155 forks source link

Rotation matrix handedness #512

Open hayashi-stl opened 4 years ago

hayashi-stl commented 4 years ago

Looking at the documentation for Basis2, it claims to be a rotation matrix. However, the guarantee is that it's orthogonal, which is not enough for a rotation matrix. The determinant has to be 1. In fact, Basis2::look_at_stable can create a reflection matrix. Should reflection matrices be allowed in Basis2 or should the hole in Basis2::look_at_stable be fixed and the documentation updated to say that Basis2 is guaranteed to be orthogonal and have a determinant of 1?

kvark commented 4 years ago

Did you see https://github.com/rustgd/cgmath/pull/508 that is deprecating look_at?

hayashi-stl commented 4 years ago

Okay, I'll wait and see if the replacement can still produce reflection matrices.