aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 7c375e6..f5d5bc6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5109,6 +5109,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5109 5109
5110 s = Math.Cos(angle * 0.5); 5110 s = Math.Cos(angle * 0.5);
5111 t = Math.Sin(angle * 0.5); // temp value to avoid 2 more sin() calcs 5111 t = Math.Sin(angle * 0.5); // temp value to avoid 2 more sin() calcs
5112 axis = LSL_Vector.Norm(axis);
5112 x = axis.x * t; 5113 x = axis.x * t;
5113 y = axis.y * t; 5114 y = axis.y * t;
5114 z = axis.z * t; 5115 z = axis.z * t;
@@ -5149,7 +5150,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5149 y = rot.y / s; 5150 y = rot.y / s;
5150 z = rot.z / s; 5151 z = rot.z / s;
5151 } 5152 }
5152 5153 if ((double.IsNaN(x)) || double.IsInfinity(x)) x = 0;
5154 if ((double.IsNaN(y)) || double.IsInfinity(y)) y = 0;
5155 if ((double.IsNaN(z)) || double.IsInfinity(z)) z = 0;
5153 return new LSL_Vector(x,y,z); 5156 return new LSL_Vector(x,y,z);
5154 } 5157 }
5155 5158
@@ -5171,7 +5174,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5171 } 5174 }
5172 5175
5173 double angle = 2 * Math.Acos(rot.s); 5176 double angle = 2 * Math.Acos(rot.s);
5174 5177 if ((double.IsNaN(angle)) || double.IsInfinity(angle)) angle = 0;
5175 return angle; 5178 return angle;
5176 } 5179 }
5177 5180