diff --git a/src/m_fixed.h b/src/m_fixed.h
index 4609913b7a413eba617146772c8f8d468c4120ef..654af6beac03d675fe32d3621fb3b87f5e8828ed 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