[Project64] fix issue in 2012

This commit is contained in:
Nicholas 2016-02-24 10:06:52 +11:00
parent 83490b75b6
commit 1ed5b044b3
1 changed files with 5 additions and 5 deletions

View File

@ -24,24 +24,24 @@
#if (defined(_MSC_VER) && (_MSC_VER < 1800))
double round(double num)
{
return (num - floor(num) > 0.5) ? ceil(num) : floor(num);
return (num - floor(num) > 0.5) ? ceil(num) : floor(num);
}
float roundf(float num)
{
return (num - floorf(num) > 0.5) ? ceilf(num) : floorf(num);
return (num - floorf(num) > 0.5) ? ceilf(num) : floorf(num);
}
#endif
#if (defined(_MSC_VER) && (_MSC_VER < 1700))
#if (defined(_MSC_VER) && (_MSC_VER <= 1700))
double trunc(double num)
{
return (num < 0) ? ceil(num) : floor(num);
return (num < 0) ? ceil(num) : floor(num);
}
float truncf(float num)
{
return (num < 0) ? ceilf(num) : floorf(num);
return (num < 0) ? ceilf(num) : floorf(num);
}
#endif