Official Javadoc says that Math.floor()
returns a double
that is \"equal to a mathematical integer\", but then why shouldn\'t it return an in
So that error and other non integer values can correctly cascade through a series of calculations.
For instance, if you feed Not a Number (NaN) into Math.floor, it'll pass it along.
If it returned integer it couldn't pass these status or errors along, and you could get bad results from an earlier calculation that look good but are wrong after further processing.