mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-03 00:18:20 +00:00
Fix llRot2Euler exception
This commit is contained in:
parent
bc4f574b33
commit
6b7b366f63
1 changed files with 2 additions and 2 deletions
|
@ -1414,11 +1414,11 @@ def llRot2Euler(r):
|
||||||
1.-2.*(r[0]*r[0]+r[2]*r[2])))
|
1.-2.*(r[0]*r[0]+r[2]*r[2])))
|
||||||
|
|
||||||
qy2 = r[1]*r[1]
|
qy2 = r[1]*r[1]
|
||||||
return (
|
return Vector((
|
||||||
math.atan2(2.*(r[0]*r[3]-r[1]*r[2]), 1.-2.*(r[0]*r[0]+qy2)),
|
math.atan2(2.*(r[0]*r[3]-r[1]*r[2]), 1.-2.*(r[0]*r[0]+qy2)),
|
||||||
math.asin(y),
|
math.asin(y),
|
||||||
math.atan2(2.*(r[2]*r[3]-r[0]*r[1]), 1.-2.*(r[2]*r[2]+qy2))
|
math.atan2(2.*(r[2]*r[3]-r[0]*r[1]), 1.-2.*(r[2]*r[2]+qy2))
|
||||||
)
|
))
|
||||||
|
|
||||||
def llRot2Fwd(r):
|
def llRot2Fwd(r):
|
||||||
assert isrotation(r)
|
assert isrotation(r)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue