>>>>> "David" == David Gilbert <[EMAIL PROTECTED]> writes:
>> I thought Math.round(), but the API docs said it was equivalent to >> Math.floor(x + 0.5) and it returns a long, so I thought I might as >> well call Math.floor() directly. Usually it is a little better to use the Math API directly. An implementation may optimize this, and it is also slightly clearer. That said, I don't care very much, unless we think this method is likely to be used in a performance-critical way. David> Math.round() fails only for the test David> cases where the values are outside the range Integer.MIN_VALUE to David> Integer.MAX_VALUE (can't say I understand why, perhaps it is the David> intermediate cast to 'long' inside Math.round() (*)). Yeah. There's always Math.round((float) arg). Thanks for trying this out. I think we can leave it as is. Tom
