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
+3 -1
View File
@@ -2,6 +2,8 @@
#include "RageSoundUtil.h"
#include "RageUtil.h"
#include <cmath>
void RageSoundUtil::Attenuate( float *pBuf, int iSamples, float fVolume )
{
while( iSamples-- )
@@ -91,7 +93,7 @@ void RageSoundUtil::ConvertFloatToNativeInt16( const float *pFrom, int16_t *pTo,
{
for( int i = 0; i < iSamples; ++i )
{
int iOut = lrintf( pFrom[i] * 32768.0f );
int iOut = std::lrint( pFrom[i] * 32768.0f );
pTo[i] = clamp( iOut, -32768, 32767 );
}
}