Merge branch 'fix-fixedrem' into 'next'

Make FixedRem less laggy by just using the modulo operator.

See merge request STJr/SRB2!503
This commit is contained in:
James R 2019-10-07 21:16:33 -04:00
commit 91d3f7e2cc
1 changed files with 1 additions and 8 deletions

View File

@ -206,14 +206,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