index/vec2.js
function(vec2, returnNew) {
      var x,y;
      if ('number' !== typeof vec2) { //.x !== undef) {
        x = vec2.x;
        y = vec2.y;

      // Handle incoming scalars
      } else {
        x = y = vec2;
      }

      if (!returnNew) {
        return this.set(this.x * x, this.y * y);
      } else {
        return new Vec2(
          this.x * x,
          this.y * y
        );
      }
    }
function(vec2, returnNew) {
      var x,y;
      if ('number' !== typeof vec2) { //.x !== undef) {
        x = vec2.x;
        y = vec2.y;

      // Handle incoming scalars
      } else {
        x = y = vec2;
      }

      if (!returnNew) {
        return this.set(this.x * x, this.y * y);
      } else {
        return new Vec2(
          this.x * x,
          this.y * y
        );
      }
    }
function ( vec2 , returnNew ) { var x , y ; if ( 'number' !== typeof vec2 ) { //.x !== undef) { x = vec2 . x ; y = vec2 . y ; // Handle incoming scalars } else { x = y = vec2 ; } if ( ! returnNew ) { return this . set ( this . x * x , this . y * y ) ; } else { return new Vec2 ( this . x * x , this . y * y ) ; } }
Multiply this vector by the incoming `vec2`
Multiply this vector by the incoming vec2