getDirection method

Point getDirection()

Implementation

Point getDirection() {
  final d = getDistance();
  assert(d > 0, "Can't get the direction of a 0-length vector");
  return this / d;
}