[cp-patches] FYI: Point.setLocation() fix
david.gilbert at object-refinery.com
Tue Jun 27 15:48:10 UTC 2006
Tom Tromey wrote:
>>>>>>"David" == David Gilbert <david.gilbert at object-refinery.com> writes:
>David> + this.x = (int) Math.floor(x + 0.5);
>David> + this.y = (int) Math.floor(y + 0.5);
>Or maybe Math.rint()?
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. Didn't try Math.rint(), but I'll take a look...
More information about the Classpath-patches