distance(vec) {
    return Math.sqrt((vec.x - this.x) * (vec.x - this.x) + (vec.y - this.y) * (vec.y - this.y));
  }
Returns the euclidean distance between this vector and another vector.

@param {Vector2} vec A vector.
@returns {Number} The euclidean distance between the two vectors.