From 78a5703f67baa111578d1e62b7b2dbbc422e9252 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Sun, 12 Sep 2021 12:29:38 +0200 Subject: [PATCH] fix: easingoutbounce operator --- src/misc/Easing.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/misc/Easing.cpp b/src/misc/Easing.cpp index fa3cc86..e3cb697 100644 --- a/src/misc/Easing.cpp +++ b/src/misc/Easing.cpp @@ -182,11 +182,14 @@ float easeOutBounce(float x){ if (x < 1 / d1) { return n1 * easeInQuad(x); } else if (x < 2 / d1) { - return n1 * (x - 1.5 / d1) * x + 0.75; + x-= 1.5; + return n1 * (x / d1) * x + 0.75; } else if (x < 2.5 / d1) { - return n1 * (x - 2.25 / d1) * x + 0.9375; + x -= 2.25; + return n1 * (x / d1) * x + 0.9375; } else { - return n1 * (x - 2.625 / d1) * x + 0.984375; + x -= 2.625; + return n1 * (x / d1) * x + 0.984375; } }