public static Vector3 clamp(Vector3 value, Vector3 min, Vector3 max) { return(new Vector3( MyMath.max(min.x, MyMath.min(value.x, max.x)), MyMath.max(min.y, MyMath.min(value.y, max.y)), MyMath.max(min.z, MyMath.min(value.z, max.z)))); }
public static Vector4 clamp(Vector4 value, float min, float max) { return(new Vector4( MyMath.max(min, MyMath.min(value.x, max)), MyMath.max(min, MyMath.min(value.y, max)), MyMath.max(min, MyMath.min(value.z, max)), MyMath.max(min, MyMath.min(value.w, max)))); }
public static Vector4 clamp(Vector4 value, Vector4 min, Vector4 max) { return(new Vector4( MyMath.max(min.x, MyMath.min(value.x, max.x)), MyMath.max(min.y, MyMath.min(value.y, max.y)), MyMath.max(min.z, MyMath.min(value.z, max.z)), MyMath.max(min.w, MyMath.min(value.w, max.w)))); }
public static Vector2 clamp(Vector2 value, Vector2 min, Vector2 max) { return(new Vector2(MyMath.max(min.x, MyMath.min(value.x, max.x)), MyMath.max(min.y, MyMath.min(value.y, max.y)))); }
public static float clamp(float value, float min, float max) { return(MyMath.max(min, MyMath.min(value, max))); }