Skip to content

Commit f875d37

Browse files
authored
fixed solution (#98)
1 parent ab904e9 commit f875d37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Coordinate.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public double getDistanceToOriginPoint() {
2222

2323
public int compareTo(Coordinate c) {
2424
if (getDistanceToOriginPoint() < c.getDistanceToOriginPoint()) {
25-
return 1;
26-
} else if (getDistanceToOriginPoint() > c.getDistanceToOriginPoint()) {
2725
return -1;
26+
} else if (getDistanceToOriginPoint() > c.getDistanceToOriginPoint()) {
27+
return 1;
2828
} else {
2929
return 0;
3030
}

0 commit comments

Comments
 (0)