tarcieri / micromath

Embedded Rust arithmetic, 2D/3D vector, and statistics library
Apache License 2.0
402 stars 21 forks source link

Adding unit tests for Quaternions #48

Closed careyk007 closed 4 years ago

careyk007 commented 4 years ago

I noticed the tests were empty so I went ahead and added some simple ones.

For what it's worth, normalizing a quaternion using q *= q.norm().invsqrt() doesn't actually result in a normalized quaternion with magnitude 1.0. This is to be expected, though, due to the ~5% tolerance of invsqrt().

tarcieri commented 4 years ago

Awesome, thanks!