summaryrefslogtreecommitdiffstats
path: root/editor/plugins/curve_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-29 10:16:46 +0200
committerGitHub <noreply@github.com>2019-04-29 10:16:46 +0200
commit18e88c85631adb0b83114687f8c20d9b210a88bf (patch)
tree28d1817600fb497215008d08045ed4e20a8cba95 /editor/plugins/curve_editor_plugin.cpp
parent90cc1d3c1d2e77ca72c5949b21a5c40738abcd81 (diff)
parentb659e1eb2b732ebc836614735438ca0bcdc8a32d (diff)
downloadredot-engine-18e88c85631adb0b83114687f8c20d9b210a88bf.tar.gz
Merge pull request #18992 from aaronfranke/mono-equal-approx
[Core] [Mono] Improve and use approximate equality methods
Diffstat (limited to 'editor/plugins/curve_editor_plugin.cpp')
-rw-r--r--editor/plugins/curve_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 3d76b5da21..2c0dd5f1db 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -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);