public static int RoundToInt(this float value, CGMath.RoundingMode mode) => CGMath.RoundToInt(value: value, mode: mode);
public void SetValue(float newValue) { ByteValue = (byte)(CGMath.Clamp(newValue, 0f, 1f) * 255); }
public static float Round(this float value, CGMath.RoundingMode mode) => CGMath.Round(value: value, mode: mode);
public Grayscale(float newValue) { ByteValue = (byte)(CGMath.Clamp(newValue, 0f, 1f) * 255); }
public void SetValue(int newValue) { ByteValue = (byte)CGMath.Clamp(newValue, 0, 255); }
public void SetValues(int newR, int newG, int newB) { byteR = CGMath.Clamp(newR, 0, 255); byteG = CGMath.Clamp(newG, 0, 255); byteB = CGMath.Clamp(newB, 0, 255); }
public static int InverseLerp(this int from, int to, float duration) => CGMath.InverseLerp(from, to, duration);
public static Quaternion AverageQuaternion(this Quaternion q1, Quaternion q2) => CGMath.AverageQuaternion(q1, q2);
public static Quaternion QuaternionFromMatrix(this Matrix4x4 m) => CGMath.QuaternionFromMatrix(m: m);
public static Coroutine To(Vector3Int from, Vector3Int to, float duration, EaseType ease, Setter <Vector3Int> setter) { return(CreateInterpolater(duration, ease, t => setter(CGMath.Lerp(from, to, t)))); }
public static Quaternion AverageQuaternion(this Quaternion[] quaternions) => CGMath.AverageQuaternion(quaternions: quaternions);
public static Vector3Int InverseLerp(this Vector3Int target, Vector3Int from, Vector3Int to, float duration) => CGMath.InverseLerp(from, to, duration);
public static Vector3Int LerpUnclamped(this Vector3Int target, Vector3Int from, Vector3Int to, float duration) => CGMath.LerpUnclamped(from, to, duration);
public byte GetOneByteColor() { return((byte)CGMath.Clamp((byteR + byteG + byteB) / 3, 0, 255)); }
public static float RoundToMultipleOf(this float value, float multiple) => CGMath.RoundToMultipleOf(value: value, multiple: multiple);
public static Quaternion AverageQuaternion(this List <Quaternion> quaternions) => CGMath.AverageQuaternion(quaternions: quaternions);
public static int RoundToMultipleIntOf(this float value, int multiple) => CGMath.RoundToMultipleIntOf(value: value, multiple: multiple);
// public Grayscale() // { // byteValue = 0; // } public Grayscale(int newValue) { ByteValue = (byte)CGMath.Clamp(newValue, 0, 255); }
public void SetValues(float newR, float newG, float newB) { byteR = (int)CGMath.Clamp(newR, 0f, 1f) * 255; byteG = (int)CGMath.Clamp(newG, 0f, 1f) * 255; byteB = (int)CGMath.Clamp(newB, 0f, 1f) * 255; }
public static int LerpUnclamped(this int from, int to, float duration) => CGMath.LerpUnclamped(from, to, duration);