コード例 #1
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.SignAsInt(float)"/>
 [MethodImpl(INLINE)] public static int SignAsInt(this float value) => Mathfs.SignAsInt(value);
コード例 #2
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <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));
コード例 #3
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <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);
コード例 #4
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Mod(int,int)"/>
 [MethodImpl(INLINE)] public static int Mod(this int value, int length) => Mathfs.Mod(value, length);
コード例 #5
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <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);
コード例 #6
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.RoundToInt(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector3Int RoundToInt(this Vector3 value) => Mathfs.RoundToInt(value);
コード例 #7
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Frac(Vector4)"/>
 [MethodImpl(INLINE)] public static Vector4 Frac(this Vector4 v) => Mathfs.Frac(v);
コード例 #8
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.FloorToInt(float)"/>
 [MethodImpl(INLINE)] public static int FloorToInt(this float value) => Mathfs.FloorToInt(value);
コード例 #9
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.FloorToInt(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector3Int FloorToInt(this Vector3 value) => Mathfs.FloorToInt(value);
コード例 #10
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Floor(float)"/>
 [MethodImpl(INLINE)] public static float Floor(this float value) => Mathfs.Floor(value);
コード例 #11
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Floor(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector4 Floor(this Vector4 value) => Mathfs.Floor(value);
コード例 #12
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.SignWithZeroAsInt(float,float)"/>
 [MethodImpl(INLINE)] public static int SignWithZeroAsInt(this float value, float zeroThreshold = 0.000001f) => Mathfs.SignWithZeroAsInt(value, zeroThreshold);
コード例 #13
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.SignWithZero(int)"/>
 [MethodImpl(INLINE)] public static int SignWithZero(this int value) => Mathfs.SignWithZero(value);
コード例 #14
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.SignWithZero(Vector4,float)"/>
 [MethodImpl(INLINE)] public static Vector4 SignWithZero(this Vector4 value, float zeroThreshold = 0.000001f) => Mathfs.SignWithZero(value, zeroThreshold);
コード例 #15
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Round(Vector2,float)"/>
 [MethodImpl(INLINE)] public static Vector4 Round(this Vector4 value, float snapInterval) => Mathfs.Round(value, snapInterval);
コード例 #16
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Ceil(float)"/>
 [MethodImpl(INLINE)] public static float Ceil(this float value) => Mathfs.Ceil(value);
コード例 #17
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.RoundToInt(float)"/>
 [MethodImpl(INLINE)] public static int RoundToInt(this float value) => Mathfs.RoundToInt(value);
コード例 #18
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Ceil(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector4 Ceil(this Vector4 value) => Mathfs.Ceil(value);
コード例 #19
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Frac(float)"/>
 [MethodImpl(INLINE)] public static float Frac(this float x) => Mathfs.Frac(x);
コード例 #20
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.CeilToInt(float)"/>
 [MethodImpl(INLINE)] public static int CeilToInt(this float value) => Mathfs.CeilToInt(value);
コード例 #21
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Repeat(float,float)"/>
 [MethodImpl(INLINE)] public static float Repeat(this float value, float length) => Mathfs.Repeat(value, length);
コード例 #22
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.CeilToInt(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector3Int CeilToInt(this Vector3 value) => Mathfs.CeilToInt(value);
コード例 #23
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.SmoothCos01(float)"/>
 [MethodImpl(INLINE)] public static float SmoothCos01(this float x) => Mathfs.SmoothCos01(x);
コード例 #24
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Round(float)"/>
 [MethodImpl(INLINE)] public static float Round(this float value) => Mathfs.Round(value);
コード例 #25
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <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);
コード例 #26
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Round(Vector2)"/>
 [MethodImpl(INLINE)] public static Vector4 Round(this Vector4 value) => Mathfs.Round(value);
コード例 #27
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <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);
コード例 #28
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Round(float)"/>
 [MethodImpl(INLINE)] public static float Round(this float value, float snapInterval) => Mathfs.Round(value, snapInterval);
コード例 #29
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <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));
コード例 #30
0
ファイル: Extensions.cs プロジェクト: MohitSethi99/Mathfs
 /// <inheritdoc cref="Mathfs.Sign(Vector4)"/>
 [MethodImpl(INLINE)] public static Vector4 Sign(this Vector4 value) => Mathfs.Sign(value);