distanceSq method

double distanceSq()

Returns the square of the Euclidean distance (straight-line distance) between the line's start and end vectors.

Implementation

double distanceSq() {
  return start.distanceToSquared(end);
}