compare method

int compare(
  1. int segmentIndex,
  2. double dist
)
override

@return -1 this EdgeIntersection is located before the argument location @return 0 this EdgeIntersection is at the argument location @return 1 this EdgeIntersection is located after the argument location

Implementation

int compare(int segmentIndex, double dist) {
  if (this.segmentIndex < segmentIndex) return -1;
  if (this.segmentIndex > segmentIndex) return 1;
  if (this.dist < dist) return -1;
  if (this.dist > dist) return 1;
  return 0;
}