From db43b90b707eecd4d0a8fab342278bc89cb377ef Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 17 Apr 2025 20:49:35 +0200 Subject: [PATCH] Revert "convert fixed to float with multiplication instead of division" i did not intend to push this to testing lel --- src/m_fixed.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/m_fixed.h b/src/m_fixed.h index 8f537b328..3f1acd7ae 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -39,11 +39,9 @@ typedef UINT32 ufixed_t; \brief convert fixed_t into floating number */ -static const float FLOATUNIT = (1.0f / (float)FRACUNIT); - FUNCMATH FUNCINLINE static ATTRINLINE float FixedToFloat(fixed_t x) { - return x * FLOATUNIT; + return x / (float)FRACUNIT; } FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FloatToFixed(float f)