You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Use approximate equallity methods in many places
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user