+ 10
How to differentiate Math.floor from Math.round ?
2 Respostas
+ 11
think of it in a different light. Floor will always go down to the last integer.The float 3.8 will be dropped down to 3. Round is just that 3.8 will round up to 4. 3.3 will round down to 3.
+ 4
Math.floor - rounds down, Math.ceil - rounds up, Math.round - rounds according to the rules of mathematics