Added check for roundf function. If it's defined in a system library, redefining it in RageUtil.h causes stepmania to fail to link with g++.

This commit is contained in:
Steve Checkoway
2003-05-09 21:34:25 +00:00
parent 8e0e7a8418
commit 2c814f4fda
+2
View File
@@ -110,8 +110,10 @@ inline double trunc( double f ) { return float(int(f)); };
#include <math.h>
#endif
inline float truncf( float f ) { return float(int(f)); };
#ifndef HAVE_ROUNDF
inline float roundf( float f ) { if(f < 0) return truncf(f-0.5f); return truncf(f+0.5f); };
inline double roundf( double f ){ if(f < 0) return trunc(f-0.5); return trunc(f+0.5); };
#endif
inline float froundf( const float f, const float fRoundInterval )
{
return int( (f + fRoundInterval/2)/fRoundInterval ) * fRoundInterval;