diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-10 23:25:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-10 23:25:59 +0100 |
commit | c3023e84c2ec38f43aff872c7f2db473e5bc665a (patch) | |
tree | 8e77e0bd0ab581acac06966008b96898cc351151 /scene/resources | |
parent | c02cd5139f4b2c7bf9ba2592fc9e0ebad3edfe88 (diff) | |
parent | b4315abb715a097b453f7a8a528e7aef8c5815e3 (diff) |
Merge pull request #23632 from DualMatrix/floating_point
Fixed floating point issue in find() of animation.
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/animation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 5c01cadcd5..803c85ef34 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -1469,7 +1469,7 @@ int Animation::_find(const Vector<K> &p_keys, float p_time) const { middle = (low + high) / 2; - if (p_time == keys[middle].time) { //match + if (Math::abs(p_time - keys[middle].time) < CMP_EPSILON) { //match return middle; } else if (p_time < keys[middle].time) high = middle - 1; //search low end of array |