Implementation of lroundf, if needed.

This commit is contained in:
Steve Checkoway
2007-01-02 23:43:55 +00:00
parent c4284cb792
commit b074f49334
+6 -1
View File
@@ -76,7 +76,7 @@ using namespace std;
namespace Checkpoints
{
void SetCheckpoint( const char *file, int line, const char *message );
};
}
#define CHECKPOINT (Checkpoints::SetCheckpoint(__FILE__, __LINE__, NULL))
#define CHECKPOINT_M(m) (Checkpoints::SetCheckpoint(__FILE__, __LINE__, m))
@@ -208,6 +208,11 @@ inline float roundf( float f ) CONST_FUNCTION;
float roundf( float f ) { if( f < 0.0f ) return truncf( f-0.5f ); return truncf( f+0.5f ); }
#endif
#ifdef NEED_LROUNDF
inline long int lroundf( float f ) CONST_FUNCTION;
long int lroundf( float f ) { return (long int)roundf( f ); }
#endif
#ifdef NEED_STRTOF
inline float strtof( const char *s, char **se ) { return (float) strtod( s, se ); }
#endif