norm method

void norm()

Implementation

void norm() {
  double length = math.sqrt(math.pow(x, 2) + math.pow(y, 2));
  x = x / length;
  y = y / length;
}