dot(vector) {
        return this._x * vector.x + this._y * vector.y;
    }
Calculates the dot product of 2 vectors

     params:
     @vector (Vec2): vector to use for dot product

     returns:
     @dotProduct (float): dot product of the 2 vectors
*