Simplify v*q, make q*q more accurate, add q*q and q/q unit tests
vector * quaternion: Simplified by precalculating the repeated products and removing math.fsum. quaternion * quaternion: Add more F32's to get a result closer to SL's (still not there, but we're definitively closer now). We left out quaternion/quaternion in the tests, and the q*q test was not general enough (had many zeros). Remedied that.
This commit is contained in:
@@ -50,6 +50,9 @@
|
||||
, <3.,4.,5.>*ZERO_ROTATION
|
||||
, <3.,4.,5.>*<.22,.26,.38,.86>
|
||||
, <3.,4.,5.>/<.22,.26,.38,.86>
|
||||
, "FIXME: We're not obtaining the same as SL; expected output should be 8.32 exact rather than 8.320001"
|
||||
, <3.,5.,7.,17.>*<.22,.26,.38,.86>
|
||||
, <3.,5.,7.,17.>/<.22,.26,.38,.86>
|
||||
, 0 % 5
|
||||
, 1 % 5
|
||||
, 2 % 5
|
||||
|
||||
Reference in New Issue
Block a user