Use approximate equallity methods in many places

This commit is contained in:
Aaron Franke 2019-01-16 10:42:53 -05:00
parent c577ec6ae4
commit b659e1eb2b
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
21 changed files with 66 additions and 66 deletions

View file

@ -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);