aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie2013-06-11 01:03:15 +0100
committerMelanie2013-06-11 01:03:15 +0100
commita022ee576639c1bbceb5c4ba8de3cbd82e538bb3 (patch)
treefb0d2ee165b7c87e814fc35c6551a26c2c6a488a /OpenSim/Region/ScriptEngine/Shared/Api
parentMerge branch 'master' into careminster (diff)
parentCheck For NaN and Infinity in llRot2Axis/Angle Fixes mantis #6669 (diff)
downloadopensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.zip
opensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.gz
opensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.bz2
opensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-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