lengthSquared method

num lengthSquared()

Implementation

num lengthSquared() {
  var head = this.head();
  var tail = this.tail();

  if (tail != null) {
    return tail.point.distanceToSquared(head.point);
  }

  return -1;
}