Commit ced7ddc9 authored by Marcel Stör's avatar Marcel Stör Committed by Johny Mattsson
Browse files

Fix math.floor for negative integers (#1454)

Fixes #1453
parent 16051d51
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment