Tom Tromey wrote:

"David" == David Gilbert <[EMAIL PROTECTED]> writes:

David> +    this.x = (int) Math.floor(x + 0.5);
David> +    this.y = (int) Math.floor(y + 0.5);

Math.round()?
Or maybe Math.rint()?

Tom

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...

Regards,

Dave



Reply via email to