aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorteravus2013-06-10 18:47:08 -0500
committerteravus2013-06-10 18:47:08 -0500
commit1c7fbb86c21f79938e4ea9dafef1e8d8f4a29a8d (patch)
tree69dc79870b38f398c3816a74c80c78084c784ed5 /OpenSim/Region/ScriptEngine/Shared
parentadd a Normalize() method for LSL_Rotation (diff)
downloadopensim-SC_OLD-1c7fbb86c21f79938e4ea9dafef1e8d8f4a29a8d.zip
opensim-SC_OLD-1c7fbb86c21f79938e4ea9dafef1e8d8f4a29a8d.tar.gz
opensim-SC_OLD-1c7fbb86c21f79938e4ea9dafef1e8d8f4a29a8d.tar.bz2
opensim-SC_OLD-1c7fbb86c21f79938e4ea9dafef1e8d8f4a29a8d.tar.xz
Check For NaN and Infinity in llRot2Axis/Angle Fixes mantis #6669
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
1 files changed, 4 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 ec5aa49..9427061 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4692,7 +4692,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4692 y = rot.y / s; 4692 y = rot.y / s;
4693 z = rot.z / s; 4693 z = rot.z / s;
4694 } 4694 }
4695 4695 if ((double.IsNaN(x)) || double.IsInfinity(x)) x = 0;
4696 if ((double.IsNaN(y)) || double.IsInfinity(y)) y = 0;
4697 if ((double.IsNaN(z)) || double.IsInfinity(z)) z = 0;
4696 return new LSL_Vector(x,y,z); 4698 return new LSL_Vector(x,y,z);
4697 } 4699 }
4698 4700
@@ -4714,7 +4716,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4714 } 4716 }
4715 4717
4716 double angle = 2 * Math.Acos(rot.s); 4718 double angle = 2 * Math.Acos(rot.s);
4717 4719 if ((double.IsNaN(angle)) || double.IsInfinity(angle)) angle = 0;
4718 return angle; 4720 return angle;
4719 } 4721 }
4720 4722