diff --git a/source/funkin/util/MathUtil.hx b/source/funkin/util/MathUtil.hx index a6ad11f5c..75af73ea4 100644 --- a/source/funkin/util/MathUtil.hx +++ b/source/funkin/util/MathUtil.hx @@ -65,13 +65,13 @@ class MathUtil /** * Performs a modulo operation to calculate the remainder of `a` divided by `b`. - * + * * The definition of "remainder" varies by implementation; * this one is similar to GLSL or Python in that it uses Euclidean division, which always returns positive, * while Haxe's `%` operator uses signed truncated division. - * + * * For example, `-5 % 3` returns `-2` while `FlxMath.mod(-5, 3)` returns `1`. - * + * * @param a The dividend. * @param b The divisor. * @return `a mod b`. @@ -129,7 +129,7 @@ class MathUtil { if (deltaTime == 0) return base; if (base == target) return target; - return lerp(target, base, exp2(-deltaTime / halfLife)); + return lerp(base, target, exp2(-deltaTime / halfLife)); } /** @@ -154,7 +154,7 @@ class MathUtil { if (deltaTime == 0) return base; if (base == target) return target; - return lerp(target, base, Math.pow(precision, deltaTime / duration)); + return lerp(base, target, Math.pow(precision, deltaTime / duration)); } /**