mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
adding a clip method to handle Vector3 objects to enable a minor amount of refactoring
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
ef4122213c
commit
e9ea911563
@@ -850,6 +850,12 @@ namespace OpenSim.Framework
|
||||
return Math.Min(Math.Max(x, min), max);
|
||||
}
|
||||
|
||||
public static Vector3 Clip(Vector3 vec, float min, float max)
|
||||
{
|
||||
return new Vector3(Clip(vec.X, min, max), Clip(vec.Y, min, max),
|
||||
Clip(vec.Z, min, max));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert an UUID to a raw uuid string. Right now this is a string without hyphens.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user