Repository navigation
LatLong.compareTo() fix - #1628
Conversation
|
@Sublimis Do you think we need some tests in |
This could be useful, yes. Some tests will be crafted. |
|
@Sublimis Should we compare |
|
@devemux86 This probably wouldn't matter while running, but if you think it improves consistency, that's good. It's interesting to note how the latitude always comes first, it's always latlon, not lonlat. What do you think of this cleanup now? |
While it's usually
@Sublimis Looks good, we can merge it if it's ready. |
|
It's ready. |
|
@Sublimis Thanks! |
LatLong.compareTo()was incorrectly implemented, so it could happen that e.g.latLon1.compareTo(latLon2) == latLon2.compareTo(latLon1) == 1for coordinateslatLon1=(1, 0)andlatLon2=(0, 1).Although the fix is crucial,
LatLong.compareTo()does not seem to be used at the moment (is this correct?), so it may not change any current behavior of the library.