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
|
@ -1568,21 +1568,21 @@ def llRot2Euler(r):
|
|||
|
||||
def llRot2Fwd(r):
|
||||
assert isrotation(r)
|
||||
v = (1., 0., 0.)
|
||||
v = Vector((1., 0., 0.))
|
||||
if r == (0., 0., 0., 0.):
|
||||
return v
|
||||
return llVecNorm(mul(v, r, f32=False))
|
||||
|
||||
def llRot2Left(r):
|
||||
assert isrotation(r)
|
||||
v = (0., 1., 0.)
|
||||
v = Vector((0., 1., 0.))
|
||||
if r == (0., 0., 0., 0.):
|
||||
return v
|
||||
return llVecNorm(mul(v, r, f32=False))
|
||||
|
||||
def llRot2Up(r):
|
||||
assert isrotation(r)
|
||||
v = (0., 0., 1.)
|
||||
v = Vector((0., 0., 1.))
|
||||
if r == (0., 0., 0., 0.):
|
||||
return v
|
||||
return llVecNorm(mul(v, r, f32=False))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue