diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index 3e810816ab..ca1212f0d4 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -104,7 +104,11 @@ inline float randomf( const float low=-1.0f, const float high=1.0f ) /* XXX: These are C99 functions (except for the roundf(double) overload); what's * the C99 define we can test for? */ +#if defined(WIN32) inline double trunc( double f ) { return float(int(f)); }; +#else +#include +#endif inline float truncf( float f ) { return float(int(f)); }; 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); };