index/vec2.js
function(vec2, returnNew) {
      if (!returnNew) {
        this.x += vec2.x; this.y += vec2.y;
        return this.change();
      } else {
        // Return a new vector if `returnNew` is truthy
        return new Vec2(
          this.x + vec2.x,
          this.y + vec2.y
        );
      }
    }
function(vec2, returnNew) {
      if (!returnNew) {
        this.x += vec2.x; this.y += vec2.y;
        return this.change();
      } else {
        // Return a new vector if `returnNew` is truthy
        return new Vec2(
          this.x + vec2.x,
          this.y + vec2.y
        );
      }
    }
function ( vec2 , returnNew ) { if ( ! returnNew ) { this . x += vec2 . x ; this . y += vec2 . y ; return this . change ( ) ; } else { // Return a new vector if `returnNew` is truthy return new Vec2 ( this . x + vec2 . x , this . y + vec2 . y ) ; } }
Add the incoming `vec2` vector to this vector
Add the incoming vec2 vector to this vector