diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-29 10:16:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-29 10:16:46 +0200 |
commit | 18e88c85631adb0b83114687f8c20d9b210a88bf (patch) | |
tree | 28d1817600fb497215008d08045ed4e20a8cba95 /editor/editor_inspector.cpp | |
parent | 90cc1d3c1d2e77ca72c5949b21a5c40738abcd81 (diff) | |
parent | b659e1eb2b732ebc836614735438ca0bcdc8a32d (diff) |
Merge pull request #18992 from aaronfranke/mono-equal-approx
[Core] [Mono] Improve and use approximate equality methods
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r-- | editor/editor_inspector.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index b0a1331b2e..ecb9ea5f35 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -434,7 +434,7 @@ bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Varian float a = p_current; float b = p_orig; - return Math::abs(a - b) > CMP_EPSILON; //this must be done because, as some scenes save as text, there might be a tiny difference in floats due to numerical error + return !Math::is_equal_approx(a, b); //this must be done because, as some scenes save as text, there might be a tiny difference in floats due to numerical error } return bool(Variant::evaluate(Variant::OP_NOT_EQUAL, p_current, p_orig)); |