constructor(x, y) {
    if (arguments.length == 0) {
      this.x = 0;
      this.y = 0;
    } else if (arguments.length == 1) {
      this.x = x.x;
      this.y = x.y;
    } else {
      this.x = x;
      this.y = y;
    }
  }
The constructor of the class Vector2.

@param {(Number|Vector2)} x The initial x coordinate value or, if the single argument, a Vector2 object.
@param {Number} y The initial y coordinate value.