mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
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:
parent
ec509b3840
commit
00b103c8aa
3 changed files with 34 additions and 16 deletions
|
@ -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
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
, <3., 4., 5.>
|
||||
, <2.6432, 3.8576, 5.304>
|
||||
, <3.4, 3.72, 4.96>
|
||||
, "FIXME: We're not obtaining the same as SL; expected output should be 8.32 exact rather than 8.320001"
|
||||
, <6.24, 8.320001, 12.8, 10.>
|
||||
, <-1.08, 0.2800001, -0.7600001, 19.24>
|
||||
, 0
|
||||
, 1
|
||||
, 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue