aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 96644ec..e4d7e19 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -303,12 +303,12 @@ namespace OpenSim.Framework
303 // Clamp the maximum magnitude of a vector 303 // Clamp the maximum magnitude of a vector
304 public static Vector3 ClampV(Vector3 x, float max) 304 public static Vector3 ClampV(Vector3 x, float max)
305 { 305 {
306 Vector3 ret = x;
307 float lenSq = x.LengthSquared(); 306 float lenSq = x.LengthSquared();
308 if (lenSq > (max * max)) 307 if (lenSq > (max * max))
309 { 308 {
310 x = x / x.Length() * max; 309 x = x / x.Length() * max;
311 } 310 }
311
312 return x; 312 return x;
313 } 313 }
314 314