diff --git a/Source/Engine/Core/Math/Mathf.cs b/Source/Engine/Core/Math/Mathf.cs
index 488c46777..21a800a51 100644
--- a/Source/Engine/Core/Math/Mathf.cs
+++ b/Source/Engine/Core/Math/Mathf.cs
@@ -539,6 +539,16 @@ namespace FlaxEngine
return (float)Math.Sin(f);
}
+ ///
+ /// Returns signed fractional part of a float.
+ ///
+ /// Floating point value to convert.
+ /// A float between [0 ; 1) for nonnegative input. A float between [-1; 0) for negative input.
+ public static float Frac(float value)
+ {
+ return value - (int)value;
+ }
+
///
/// Gradually changes a value towards a desired goal over time with smoothing.
///