Make FixedRem less laggy by just using the modulo operator.

This commit is contained in:
Alug committed 2024-04-19 06:22:20 +02:00
1 parent 36e06e5d6b
commit 2ccf91fbfc
1 file changed
+1 -8
+1 -8
View File
@@ -121,14 +121,7 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedDiv(fixed_t a, fixed_t b)
*/
FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedRem(fixed_t x, fixed_t y)
{
const boolean n = x < 0;
x = abs(x);
while (x >= y)
x -= y;
if (n)
return -x;
else
return x;
return x % y;
}
/** \brief The FixedSqrt function