diff options
Diffstat (limited to 'modules/mono/glue/Managed/Files/MathfEx.cs')
-rw-r--r-- | modules/mono/glue/Managed/Files/MathfEx.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mono/glue/Managed/Files/MathfEx.cs b/modules/mono/glue/Managed/Files/MathfEx.cs index 2ef02cc288..d6eb65b097 100644 --- a/modules/mono/glue/Managed/Files/MathfEx.cs +++ b/modules/mono/glue/Managed/Files/MathfEx.cs @@ -35,5 +35,10 @@ namespace Godot { return (int)Math.Round(s); } + + public static bool IsEqualApprox(real_t a, real_t b, real_t tolerance) + { + return Abs(a - b) < tolerance; + } } }
\ No newline at end of file |