getDirection method

ExpressivePoint getDirection()

This point divided by its distance from the origin.

Implementation

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