Example #1
0
 /// <inheritdoc cref="Mathfs.SignAsInt(float)"/>
 [MethodImpl(INLINE)] public static int SignAsInt(this float value) => Mathfs.SignAsInt(value);
Example #2
0
 /// <inheritdoc cref="Mathfs.Remap(Vector4,Vector4,Vector4,Vector4,Vector4)"/>
 [MethodImpl(INLINE)] public static Vector4 Remap(this Vector4 v, Vector4 iMin, Vector4 iMax, Vector4 oMin, Vector4 oMax) => Mathfs.Lerp(oMin, oMax, Mathfs.InverseLerp(iMin, iMax, v));
Example #3
0
 /// <inheritdoc cref="Mathfs.Remap(Bounds,Bounds,Vector3)"/>
 [MethodImpl(INLINE)] public static Vector3 Remap(this Vector3 iPos, Bounds iBounds, Bounds oBounds) => Mathfs.Remap(iBounds.min, iBounds.max, oBounds.min, oBounds.max, iPos);
Example #4
0
 /// <inheritdoc cref="Mathfs.Mod(int,int)"/>
 [MethodImpl(INLINE)] public static int Mod(this int value, int length) => Mathfs.Mod(value, length);
Example #5
0
 /// <inheritdoc cref="Mathfs.Remap(float,float,float,float,float)"/>
 [MethodImpl(INLINE)] public static float Remap(this float value, float iMin, float iMax, float oMin, float oMax) => Mathfs.Remap(iMin, iMax, oMin, oMax, value);
Example #6
0
 /// <inheritdoc cref="Mathfs.RoundToInt(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector3Int RoundToInt(this Vector3 value) => Mathfs.RoundToInt(value);
Example #7
0
 /// <inheritdoc cref="Mathfs.Frac(Vector4)"/>
 [MethodImpl(INLINE)] public static Vector4 Frac(this Vector4 v) => Mathfs.Frac(v);
Example #8
0
 /// <inheritdoc cref="Mathfs.FloorToInt(float)"/>
 [MethodImpl(INLINE)] public static int FloorToInt(this float value) => Mathfs.FloorToInt(value);
Example #9
0
 /// <inheritdoc cref="Mathfs.FloorToInt(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector3Int FloorToInt(this Vector3 value) => Mathfs.FloorToInt(value);
Example #10
0
 /// <inheritdoc cref="Mathfs.Floor(float)"/>
 [MethodImpl(INLINE)] public static float Floor(this float value) => Mathfs.Floor(value);
Example #11
0
 /// <inheritdoc cref="Mathfs.Floor(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector4 Floor(this Vector4 value) => Mathfs.Floor(value);
Example #12
0
 /// <inheritdoc cref="Mathfs.SignWithZeroAsInt(float,float)"/>
 [MethodImpl(INLINE)] public static int SignWithZeroAsInt(this float value, float zeroThreshold = 0.000001f) => Mathfs.SignWithZeroAsInt(value, zeroThreshold);
Example #13
0
 /// <inheritdoc cref="Mathfs.SignWithZero(int)"/>
 [MethodImpl(INLINE)] public static int SignWithZero(this int value) => Mathfs.SignWithZero(value);
Example #14
0
 /// <inheritdoc cref="Mathfs.SignWithZero(Vector4,float)"/>
 [MethodImpl(INLINE)] public static Vector4 SignWithZero(this Vector4 value, float zeroThreshold = 0.000001f) => Mathfs.SignWithZero(value, zeroThreshold);
Example #15
0
 /// <inheritdoc cref="Mathfs.Round(Vector2,float)"/>
 [MethodImpl(INLINE)] public static Vector4 Round(this Vector4 value, float snapInterval) => Mathfs.Round(value, snapInterval);
Example #16
0
 /// <inheritdoc cref="Mathfs.Ceil(float)"/>
 [MethodImpl(INLINE)] public static float Ceil(this float value) => Mathfs.Ceil(value);
Example #17
0
 /// <inheritdoc cref="Mathfs.RoundToInt(float)"/>
 [MethodImpl(INLINE)] public static int RoundToInt(this float value) => Mathfs.RoundToInt(value);
Example #18
0
 /// <inheritdoc cref="Mathfs.Ceil(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector4 Ceil(this Vector4 value) => Mathfs.Ceil(value);
Example #19
0
 /// <inheritdoc cref="Mathfs.Frac(float)"/>
 [MethodImpl(INLINE)] public static float Frac(this float x) => Mathfs.Frac(x);
Example #20
0
 /// <inheritdoc cref="Mathfs.CeilToInt(float)"/>
 [MethodImpl(INLINE)] public static int CeilToInt(this float value) => Mathfs.CeilToInt(value);
Example #21
0
 /// <inheritdoc cref="Mathfs.Repeat(float,float)"/>
 [MethodImpl(INLINE)] public static float Repeat(this float value, float length) => Mathfs.Repeat(value, length);
Example #22
0
 /// <inheritdoc cref="Mathfs.CeilToInt(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector3Int CeilToInt(this Vector3 value) => Mathfs.CeilToInt(value);
Example #23
0
 /// <inheritdoc cref="Mathfs.SmoothCos01(float)"/>
 [MethodImpl(INLINE)] public static float SmoothCos01(this float x) => Mathfs.SmoothCos01(x);
Example #24
0
 /// <inheritdoc cref="Mathfs.Round(float)"/>
 [MethodImpl(INLINE)] public static float Round(this float value) => Mathfs.Round(value);
Example #25
0
 /// <inheritdoc cref="Mathfs.Remap(Vector3,Vector3,Vector3,Vector3,Vector3)"/>
 [MethodImpl(INLINE)] public static Vector3 Remap(this Vector3 v, Vector3 iMin, Vector3 iMax, Vector3 oMin, Vector3 oMax) => Mathfs.Remap(iMin, iMax, oMin, oMax, v);
Example #26
0
 /// <inheritdoc cref="Mathfs.Round(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector4 Round(this Vector4 value) => Mathfs.Round(value);
Example #27
0
 /// <inheritdoc cref="Mathfs.Remap(Rect,Rect,Vector2)"/>
 [MethodImpl(INLINE)] public static Vector2 Remap(this Vector2 iPos, Rect iRect, Rect oRect) => Mathfs.Remap(iRect.min, iRect.max, oRect.min, oRect.max, iPos);
Example #28
0
 /// <inheritdoc cref="Mathfs.Round(float)"/>
 [MethodImpl(INLINE)] public static float Round(this float value, float snapInterval) => Mathfs.Round(value, snapInterval);
Example #29
0
 /// <inheritdoc cref="Mathfs.Remap(float,float,float,float,float)"/>
 [MethodImpl(INLINE)] public static float RemapClamped(this float value, float iMin, float iMax, float oMin, float oMax) => Mathfs.Lerp(oMin, oMax, Mathfs.InverseLerpClamped(iMin, iMax, value));
Example #30
0
 /// <inheritdoc cref="Mathfs.Sign(Vector4)"/>
 [MethodImpl(INLINE)] public static Vector4 Sign(this Vector4 value) => Mathfs.Sign(value);