diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Util.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 384f716..1a383ae 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -862,6 +862,12 @@ namespace OpenSim.Framework | |||
862 | return Math.Min(Math.Max(x, min), max); | 862 | return Math.Min(Math.Max(x, min), max); |
863 | } | 863 | } |
864 | 864 | ||
865 | public static Vector3 Clip(Vector3 vec, float min, float max) | ||
866 | { | ||
867 | return new Vector3(Clip(vec.X, min, max), Clip(vec.Y, min, max), | ||
868 | Clip(vec.Z, min, max)); | ||
869 | } | ||
870 | |||
865 | /// <summary> | 871 | /// <summary> |
866 | /// Convert an UUID to a raw uuid string. Right now this is a string without hyphens. | 872 | /// Convert an UUID to a raw uuid string. Right now this is a string without hyphens. |
867 | /// </summary> | 873 | /// </summary> |