From f77c856cdde7ec365be7c448f2dd8cc18d0f1f32 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Wed, 1 Jun 2022 20:13:36 +0200 Subject: better reverse maybe idk --- .../java/cc/polyfrost/oneconfig/gui/animations/Animation.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/animations') diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java b/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java index d8d672d..ebb9145 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java @@ -16,9 +16,13 @@ public abstract class Animation { */ public Animation(float duration, float start, float end, boolean reverse) { this.duration = duration; + if (reverse) { + float temp = start; + start = end; + end = temp; + } this.start = start; - if (!reverse) this.change = end - start; - else this.change = start - end; + this.change = end - start; } /** -- cgit