Merge: nitvm: Basic blocks generation and SSA-algorithm
[nit.git] / benchmarks / polygons / java / code / PointXCompare.java
1
2 import java.util.Comparator;
3
4 /**
5 *
6 * @author romis_000
7 */
8 class PointXCompare
9 implements Comparator<PointDouble> {
10
11 @Override
12 public int compare(final PointDouble a, final PointDouble b) {
13 if (a.x == b.x) {
14 //return (int) (a.y - b.y);
15 return (a.y > b.y) ? -1 : +1;
16 } else {
17 //return (int)(a.x - b.x);
18 return (a.x > b.x) ? -1 : +1;
19 }
20 }
21 }