From 4f1bbd3f9b29324806409252ba109ad77d6589b2 Mon Sep 17 00:00:00 2001 From: MoonDroid <81515012+moondroidcoder@users.noreply.github.com> Date: Fri, 24 Oct 2025 16:47:25 +0700 Subject: [PATCH] Fix type mismatch in smooth lerp functions --- source/funkin/util/MathUtil.hx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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)); } /**