Only to test for equality @param t @return
(WorldCoordinate t)
| 122 | * @return |
| 123 | */ |
| 124 | @Override |
| 125 | public int compareTo(WorldCoordinate t) { |
| 126 | final double d = 0.001; |
| 127 | if(layer == t.layer && abs(x - t.x) < d && abs(y - t.y) < d) |
| 128 | return 0; |
| 129 | else if(x*x + y*y > t.x*t.x + t.y*t.y) |
| 130 | return 1; |
| 131 | else return -1; |
| 132 | } |
| 133 | } |
no outgoing calls