Clean up math functions

- Remove checking for standard functions from the build system
- Prefix all invocations with std::
- Replace suffixed functions with unprefixed versions
- Include <cmath> in all files that use it and remove the global include

e.g. floorf(x) -> std::floor(x)
This commit is contained in:
Martin Natano
2023-04-19 14:22:59 +02:00
parent f39ed52dbf
commit b68ca517e6
111 changed files with 1831 additions and 1785 deletions
+3 -1
View File
@@ -61,6 +61,8 @@
#include "Profile.h" // for replay data stuff
#include "RageDisplay.h"
#include <cmath>
// Defines
#define SHOW_LIFE_METER_FOR_DISABLED_PLAYERS THEME->GetMetricB(m_sName,"ShowLifeMeterForDisabledPlayers")
#define SHOW_SCORE_IN_RAVE THEME->GetMetricB(m_sName,"ShowScoreInRave")
@@ -1701,7 +1703,7 @@ void ScreenGameplay::Update( float fDeltaTime )
fSpeed *= GetHasteRate();
RageSoundParams p = m_pSoundMusic->GetParams();
if( fabsf(p.m_fSpeed - fSpeed) > 0.01f && fSpeed >= 0.0f)
if( std::abs(p.m_fSpeed - fSpeed) > 0.01f && fSpeed >= 0.0f)
{
p.m_fSpeed = fSpeed;
m_pSoundMusic->SetParams( p );