1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-12-09 13:39:12 +00:00

Fix type mismatch in smooth lerp functions

This commit is contained in:
MoonDroid 2025-10-24 16:47:25 +07:00
parent b99089dd88
commit 4f1bbd3f9b

View file

@ -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));
}
/**