Adjust output of llRot2Axis and llRot2Angle to match domains SL(tm) uses. Addresses Mantis #0006671
parent
ba84074468
commit
ed950e6c74
|
@ -4678,6 +4678,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double invS = 1.0 / s;
|
double invS = 1.0 / s;
|
||||||
|
if (rot.s < 0) invS = -invS;
|
||||||
return new LSL_Vector(rot.x * invS, rot.y * invS, rot.z * invS);
|
return new LSL_Vector(rot.x * invS, rot.y * invS, rot.z * invS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4692,6 +4693,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
rot.Normalize();
|
rot.Normalize();
|
||||||
|
|
||||||
double angle = 2 * Math.Acos(rot.s);
|
double angle = 2 * Math.Acos(rot.s);
|
||||||
|
if (angle > Math.PI)
|
||||||
|
angle = 2 * Math.PI - angle;
|
||||||
|
|
||||||
return angle;
|
return angle;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue