Adjust output of llRot2Axis and llRot2Angle to match domains SL(tm) uses. Addresses Mantis #0006671

cpu-performance
dahlia 2013-06-11 00:29:40 -07:00
parent ba84074468
commit ed950e6c74
1 changed files with 3 additions and 0 deletions

View File

@ -4678,6 +4678,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else
{
double invS = 1.0 / s;
if (rot.s < 0) invS = -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();
double angle = 2 * Math.Acos(rot.s);
if (angle > Math.PI)
angle = 2 * Math.PI - angle;
return angle;
}