check out the API for Math.round(double) Returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type long. In other words, the result is equal to the value of the expression: (long)Math.floor(a + 0.5d) So... it behaves just like it's supposed to.
Joined: Feb 07, 2003
Yea...I read that also. Is it just me or does this seem strange? Just as a check excel and MS SQL Server both feel that -.5 should be rounded to -1. :roll: