diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2019-10-02 16:31:09 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2019-10-14 16:47:42 -0400 |
commit | aeb70756287ad209f0b9d799bcd157dcaed41c17 (patch) | |
tree | e3392dfb99cc30f08f6f6b5f975289214fa81bec /scene/resources/animation.cpp | |
parent | 86922ff70ba533b376a6680f965f542894e8c614 (diff) | |
download | redot-engine-aeb70756287ad209f0b9d799bcd157dcaed41c17.tar.gz |
Replace vector == and is_zero_approx(distance) with is_equal_approx
Internal changes only
Diffstat (limited to 'scene/resources/animation.cpp')
-rw-r--r-- | scene/resources/animation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 985b38f913..309f5d1598 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2870,9 +2870,9 @@ bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, cons const Vector3 &v1 = t1.value.loc; const Vector3 &v2 = t2.value.loc; - if (v0 == v2) { + if (v0.is_equal_approx(v2)) { //0 and 2 are close, let's see if 1 is close - if (v0 != v1) { + if (!v0.is_equal_approx(v1)) { //not close, not optimizable return false; } @@ -2909,9 +2909,9 @@ bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, cons //localize both to rotation from q0 - if (Math::is_zero_approx((q0 - q2).length())) { + if (q0.is_equal_approx(q2)) { - if (!Math::is_zero_approx((q0 - q1).length())) + if (!q0.is_equal_approx(q1)) return false; } else { @@ -2959,9 +2959,9 @@ bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, cons const Vector3 &v1 = t1.value.scale; const Vector3 &v2 = t2.value.scale; - if (v0 == v2) { + if (v0.is_equal_approx(v2)) { //0 and 2 are close, let's see if 1 is close - if (v0 != v1) { + if (!v0.is_equal_approx(v1)) { //not close, not optimizable return false; } |