Ejemplo n.º 1
0
 /**
  * Computes the distance between this line segment and another segment.
  *
  * @return the distance to the other segment
  */
 public double distance(LineSegment ls) {
   return CGAlgorithms.distanceLineLine(p0, p1, ls.p0, ls.p1);
 }
Ejemplo n.º 2
0
 public static boolean edgesIntersect(final Edge e1, final Edge e2) {
   return CGAlgorithms.distanceLineLine(e1.start, e1.end, e2.start, e2.end) <= 0.0;
 }