mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Use approximate equallity methods in many places
This commit is contained in:
parent
c577ec6ae4
commit
b659e1eb2b
21 changed files with 66 additions and 66 deletions
|
@ -194,7 +194,7 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
|
|||
Vector2 dir = (control_pos - point_pos).normalized();
|
||||
|
||||
real_t tangent;
|
||||
if (Math::abs(dir.x) > CMP_EPSILON)
|
||||
if (!Math::is_zero_approx(dir.x))
|
||||
tangent = dir.y / dir.x;
|
||||
else
|
||||
tangent = 9999 * (dir.y >= 0 ? 1 : -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue