From ed950e6c7444510c7171c1b7829eedbf731e218a Mon Sep 17 00:00:00 2001 From: dahlia Date: Tue, 11 Jun 2013 00:29:40 -0700 Subject: Adjust output of llRot2Axis and llRot2Angle to match domains SL(tm) uses. Addresses Mantis #0006671 --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/ScriptEngine') 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 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; } -- cgit v1.1