Merge: Kill `model_utils`
[nit.git] / benchmarks / polygons / java / code / Projection.java
1
2 /**
3 * An utility class to store a projection of an edge on an axis, used by the
4 * intersects operation
5 *
6 * @author Johan
7 */
8 public class Projection {
9
10 private double min;
11 private double max;
12
13 public Projection(double min, double max) {
14 this.min = min;
15 this.max = max;
16 }
17
18 public Boolean overlap(Projection p2) {
19 return !(this.min > p2.max || p2.min > this.max);
20 }
21 }