aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authordahlia2013-06-11 00:29:40 -0700
committerdahlia2013-06-11 00:29:40 -0700
commited950e6c7444510c7171c1b7829eedbf731e218a (patch)
tree21dd94cd907e44f07f5c0e274720b5693adeebd8 /OpenSim/Region
parentLSL_Rotation.Normalize() now returns 0,0,0,1 for x,y,z,s when normalization f... (diff)
downloadopensim-SC-ed950e6c7444510c7171c1b7829eedbf731e218a.zip
opensim-SC-ed950e6c7444510c7171c1b7829eedbf731e218a.tar.gz
opensim-SC-ed950e6c7444510c7171c1b7829eedbf731e218a.tar.bz2
opensim-SC-ed950e6c7444510c7171c1b7829eedbf731e218a.tar.xz
Adjust output of llRot2Axis and llRot2Angle to match domains SL(tm) uses. Addresses Mantis #0006671
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 39bac82..e1630b3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4678,6 +4678,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4678 else 4678 else
4679 { 4679 {
4680 double invS = 1.0 / s; 4680 double invS = 1.0 / s;
4681 if (rot.s < 0) invS = -invS;
4681 return new LSL_Vector(rot.x * invS, rot.y * invS, rot.z * invS); 4682 return new LSL_Vector(rot.x * invS, rot.y * invS, rot.z * invS);
4682 } 4683 }
4683 } 4684 }
@@ -4692,6 +4693,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4692 rot.Normalize(); 4693 rot.Normalize();
4693 4694
4694 double angle = 2 * Math.Acos(rot.s); 4695 double angle = 2 * Math.Acos(rot.s);
4696 if (angle > Math.PI)
4697 angle = 2 * Math.PI - angle;
4695 4698
4696 return angle; 4699 return angle;
4697 } 4700 }