Closed GoogleCodeExporter closed 8 years ago
I analyzed the function and I found out that Math.round() is responsible for
that bug. Math.round(-0.5) returns 0.
Original comment by rico.sas...@gmail.com
on 7 Jun 2012 at 12:38
There are several rounding schemes possible, this is just the default
javascript one. Rounding -0.5 to -1 is not strictly correct, if Math.round
rounds it to 0 then that is the rounding mode supported.
Format number assumes you have parsed the number already, so you can do your
own rounding before formatting it anyway.
No plans to support multiple rounding modes right now inside the code.
Original comment by apar...@gmail.com
on 18 Oct 2013 at 12:41
Original issue reported on code.google.com by
rico.sas...@gmail.com
on 16 May 2012 at 11:45