You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
[Mono] Approximate equality
This commit is contained in:
@@ -36,9 +36,9 @@ namespace Godot
|
||||
return (int)Math.Round(s);
|
||||
}
|
||||
|
||||
public static bool IsEqualApprox(real_t a, real_t b, real_t ratio = Mathf.Epsilon)
|
||||
public static bool IsEqualApprox(real_t a, real_t b, real_t tolerance)
|
||||
{
|
||||
return Abs(a - b) < ratio;
|
||||
return Abs(a - b) < tolerance;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user