mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Adjust output of llRot2Axis and llRot2Angle to match domains SL(tm) uses. Addresses Mantis #0006671
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user