mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix llRot2Fwd/llRot2Left/llRot2Up and add regression tests.
This commit is contained in:
parent
a8231586c1
commit
91fd9734c8
2 changed files with 19 additions and 3 deletions
16
testfuncs.py
16
testfuncs.py
|
@ -924,6 +924,22 @@ def do_tests():
|
|||
test('llFrand(F32(1.4e-45))', 0.0)
|
||||
test('llFrand(F32(1.1754942106924411e-38))', 0.0)
|
||||
|
||||
test('llRot2Fwd(Quaternion((1.,0.,0.,0.)))', Vector((1.,0.,0.)))
|
||||
test('llRot2Fwd(Quaternion((0.,1.,0.,0.)))', Vector((-1.,0.,0.)))
|
||||
test('llRot2Fwd(Quaternion((0.,0.,1.,0.)))', Vector((-1.,0.,0.)))
|
||||
test('llRot2Fwd(Quaternion((0.,0.,0.,1.)))', Vector((1.,0.,0.)))
|
||||
test('llRot2Fwd(Quaternion((0.,0.,0.,0.)))', Vector((1.,0.,0.)))
|
||||
test('llRot2Left(Quaternion((1.,0.,0.,0.)))', Vector((0.,-1.,0.)))
|
||||
test('llRot2Left(Quaternion((0.,1.,0.,0.)))', Vector((0.,1.,0.)))
|
||||
test('llRot2Left(Quaternion((0.,0.,1.,0.)))', Vector((0.,-1.,0.)))
|
||||
test('llRot2Left(Quaternion((0.,0.,0.,1.)))', Vector((0.,1.,0.)))
|
||||
test('llRot2Left(Quaternion((0.,0.,0.,0.)))', Vector((0.,1.,0.)))
|
||||
test('llRot2Up(Quaternion((1.,0.,0.,0.)))', Vector((0.,0.,-1.)))
|
||||
test('llRot2Up(Quaternion((0.,1.,0.,0.)))', Vector((0.,0.,-1.)))
|
||||
test('llRot2Up(Quaternion((0.,0.,1.,0.)))', Vector((0.,0.,1.)))
|
||||
test('llRot2Up(Quaternion((0.,0.,0.,1.)))', Vector((0.,0.,1.)))
|
||||
test('llRot2Up(Quaternion((0.,0.,0.,0.)))', Vector((0.,0.,1.)))
|
||||
|
||||
lslcommon.IsCalc = True
|
||||
test('cond(llGenerateKey())', True)
|
||||
lslcommon.IsCalc = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue