Possible Duplicate:
javascript - ceiling of a dollar amount
我有这样的一些:360.654444444447
我希望这四舍五入到360.66。
How do i do it? The amount of 4 s between the 5 and 7 is unknown.
EDIT: The key issue here is that when the decimals after the 2nd would round to 5, it should round up. (ie: 360.654447 can be rounded to 360.655 - and that should round to 360.66
这类似于PHP_HALF_ROUND_MODE。