aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2010-07-08 16:05:59 -0700
committerDiva Canto2010-07-08 16:05:59 -0700
commitd2fea2bb29d3678b79c895b2a0fc79123cf4efeb (patch)
treef554e49a2862b303eee071bad2fd487cff1ef505
parentllVecNorm() now returns a zero-length vector when one is supplied as input. A... (diff)
downloadopensim-SC_OLD-d2fea2bb29d3678b79c895b2a0fc79123cf4efeb.zip
opensim-SC_OLD-d2fea2bb29d3678b79c895b2a0fc79123cf4efeb.tar.gz
opensim-SC_OLD-d2fea2bb29d3678b79c895b2a0fc79123cf4efeb.tar.bz2
opensim-SC_OLD-d2fea2bb29d3678b79c895b2a0fc79123cf4efeb.tar.xz
These 2 files want to be committed.
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs18
2 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5941abd..c5226ba 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -450,7 +450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
450 450
451 public LSL_Vector llVecNorm(LSL_Vector v) 451 public LSL_Vector llVecNorm(LSL_Vector v)
452 { 452 {
453 m_host.AddScriptLPS(1); 453 m_host.AddScriptLPS(1);
454 return LSL_Vector.Norm(v); 454 return LSL_Vector.Norm(v);
455 } 455 }
456 456
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index bb5267c..91e03ac 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -259,15 +259,15 @@ namespace OpenSim.Region.ScriptEngine.Shared
259 return Math.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z); 259 return Math.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
260 } 260 }
261 261
262 public static Vector3 Norm(Vector3 vector) 262 public static Vector3 Norm(Vector3 vector)
263 { 263 {
264 double mag = Mag(vector); 264 double mag = Mag(vector);
265 if (mag > 0.0) 265 if (mag > 0.0)
266 { 266 {
267 double invMag = 1.0 / mag; 267 double invMag = 1.0 / mag;
268 return vector * invMag; 268 return vector * invMag;
269 } 269 }
270 return new Vector3(0, 0, 0); 270 return new Vector3(0, 0, 0);
271 } 271 }
272 272
273 #endregion 273 #endregion