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 19:31:40 +02:00
parent f39ed52dbf
commit b68ca517e6
111 changed files with 1831 additions and 1785 deletions
+5 -3
View File
@@ -30,6 +30,8 @@
#include "ScoreKeeperNormal.h"
#include "InputEventPlus.h"
#include <cmath>
// metrics that are common to all ScreenEvaluation classes
#define BANNER_WIDTH THEME->GetMetricF(m_sName,"BannerWidth")
#define BANNER_HEIGHT THEME->GetMetricF(m_sName,"BannerHeight")
@@ -143,7 +145,7 @@ void ScreenEvaluation::Init()
for( float f = 0; f < 100.0f; f += 1.0f )
{
float fP1 = fmodf(f/100*4+.3f,1);
float fP1 = std::fmod(f/100*4+.3f,1);
ss.m_player[PLAYER_1].SetLifeRecordAt( fP1, f );
ss.m_player[PLAYER_2].SetLifeRecordAt( 1-fP1, f );
}
@@ -581,8 +583,8 @@ void ScreenEvaluation::Init()
RadarCategory_Hands, RadarCategory_Rolls, RadarCategory_Lifts, RadarCategory_Fakes
};
const int ind = indices[l];
const int iActual = lrintf(m_pStageStats->m_player[p].m_radarActual[ind]);
const int iPossible = lrintf(m_pStageStats->m_player[p].m_radarPossible[ind]);
const int iActual = std::lrint(m_pStageStats->m_player[p].m_radarActual[ind]);
const int iPossible = std::lrint(m_pStageStats->m_player[p].m_radarPossible[ind]);
// todo: check if format string is valid
// (two integer values in DETAILLINE_FORMAT) -aj