diff --git a/src/m_fixed.h b/src/m_fixed.h index 4609913b7..654af6bea 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -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