distance method

double distance(
  1. LineSegment ls
)

Computes the distance between this line segment and another segment.

@return the distance to the other segment

Implementation

double distance(LineSegment ls) {
  return Distance.segmentToSegment(p0, p1, ls.p0, ls.p1);
}