Re: Sort on linkedlists with double values (inside main list)
"M.v.Gulik" <[email protected]>
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <CAOSpiuGTJv+JKJaNhz=9eAMv+eCHuh9-C4y2PbzQGeuRJpxaLA@mail.gmail.com> |
Verified that "**.sort{ a, b -> a.x == b.x ? -a.y <=> **-**b.y : **-**a.x
<=> **-**b.x }*" actually behaves ok when using Double or Float values (ie:
same ordered output as with Integer or BigDecimal values).
Why "**.sort{[ -it.x, -it.y]}*" behaved differently when using Double or
Float values in this case is beyond me ... Guess i just chalk it up as some
peculiar groovy thing.
>