Posted issue http://code.google.com/p/google-web-toolkit/issues/detail?id=4805.

As for equals, why not just compare the double values directly, vs
bitwise equality?  Unless you're concerned with the various versions
of NaN and infinity this should work fine; in fact you might even want
to allow a bit of a margin to deal with rounding.

jchimene, you'd want to do something like the original poster to avoid
that, 31*hashOfpX + hashOfpY.

On Mar 31, 11:46 am, kozura <[email protected]> wrote:
> Ach, you're right, I hadn't bothered to check in deployed mode,
> assumed GWT did the right thing!  This should be posted as an issue,
> as hashCode() is listed as implemented, but it should be done
> correctly.  So I guess toString is the best way to go in the
> meantime..
>
> On Mar 31, 10:34 am, Thomas Broyer <[email protected]> wrote:
>
> > On Mar 31, 5:30 pm, kozura <[email protected]> wrote:
>
> > > ((Double)fX).hashCode() seems to work fine.
>
> > It's no more than a "return (int) value" (i.e. equivalent to "(int)
> > fX") which is probably not "accurate" enough for a Point where you
> > chose to use doubles to store the coordinates...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to