fix changing animated values with different easing wrong current position

This commit is contained in:
yugecin 2018-07-07 10:00:08 +02:00
parent 24c412778b
commit fd827fae29
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44

View File

@ -62,7 +62,7 @@ public class AnimatedValue {
float progress = (float) this.time / this.duration;
if (this.eqn != eqn) {
if (this.time != 0 && this.time != this.duration) {
progress = this.eqn.uncalc(progress);
progress = eqn.uncalc(this.eqn.calc(progress));
}
this.eqn = eqn;
}