code: static double extent(Vector2d vector) {
          double radians = Math.atan2(vector.y, vector.x);
          return radians < 0 ? TAU + radians : radians;
      }
docs: Calculate the angular extent of a vector (0-2π radians) anti clockwise from
  east {1,0}.
  
  @param vector a vector
  @return the extent (radians)