Fix math.floor for negative integers (#1454)

Fixes #1453
This commit is contained in:
Marcel Stör 2016-08-19 08:35:35 +02:00 committed by Johny Mattsson
parent 16051d51d6
commit ced7ddc926
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
double floor(double x)
{
return (double) (x < 0.f ? (((int) x) - 1) : ((int) x));
return (double) (x < 0.f ? ((int) x == x ? x : (((int) x) - 1)) : ((int) x));
}
#define MAXEXP 2031 /* (MAX_EXP * 16) - 1 */