lround for MSVC

git-svn-id: https://svn.eduke32.com/eduke32@4527 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2014-07-06 00:09:59 +00:00
parent 398d20fc5f
commit 9378066660

View file

@ -159,6 +159,13 @@ static inline float nearbyintf(float x)
}
# endif
#endif
#include <math.h>
static inline long lround(double num)
{
return (long) (num > 0 ? num + 0.5 : ceil(num - 0.5));
}
#else
# define longlong(x) x##ll
#endif