aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorSignpostMarv2012-08-17 16:53:36 +0100
committerJustin Clark-Casey (justincc)2012-08-17 18:40:49 +0100
commite9ea911563362c4766d34cd948a2915beac06124 (patch)
tree87542410a40fce3e909339112404b6bd76696e9b /OpenSim/Framework
parentenables configurable minimum sizes for physical & non-physical prims (diff)
downloadopensim-SC-e9ea911563362c4766d34cd948a2915beac06124.zip
opensim-SC-e9ea911563362c4766d34cd948a2915beac06124.tar.gz
opensim-SC-e9ea911563362c4766d34cd948a2915beac06124.tar.bz2
opensim-SC-e9ea911563362c4766d34cd948a2915beac06124.tar.xz
adding a clip method to handle Vector3 objects to enable a minor amount of refactoring
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 8cc29ee..38cb3a6 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -850,6 +850,12 @@ namespace OpenSim.Framework
850 return Math.Min(Math.Max(x, min), max); 850 return Math.Min(Math.Max(x, min), max);
851 } 851 }
852 852
853 public static Vector3 Clip(Vector3 vec, float min, float max)
854 {
855 return new Vector3(Clip(vec.X, min, max), Clip(vec.Y, min, max),
856 Clip(vec.Z, min, max));
857 }
858
853 /// <summary> 859 /// <summary>
854 /// Convert an UUID to a raw uuid string. Right now this is a string without hyphens. 860 /// Convert an UUID to a raw uuid string. Right now this is a string without hyphens.
855 /// </summary> 861 /// </summary>