If it's not already reported, and it doesn't look as if it has been, you might do us all a favor and email Kathy and/or Bert about this error.Returns the closest int 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 int. In other words, the result is equal to the value of the expression:
(int)Math.floor(a + 0.5f)
SCJP 1.4
Thanks,<br />Sudhir <br />SCJP1.4
Thanks,<br />Sudhir <br />SCJP1.4
For negative numbers the following can be applied:
1. greater than 0.5 = floor()
2. less than equal to 0.5 = ceil()
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors