src/Vec2.js
function(theta){
        return new Vec2(
            this.x*Math.cos(theta)-this.y*Math.sin(theta), 
            this.x*Math.sin(theta)+this.y*Math.cos(theta)
        );
    }
function(theta){
        return new Vec2(
            this.x*Math.cos(theta)-this.y*Math.sin(theta), 
            this.x*Math.sin(theta)+this.y*Math.cos(theta)
        );
    }
function ( theta ) { return new Vec2 ( this . x * Math . cos ( theta ) - this . y * Math . sin ( theta ) , this . x * Math . sin ( theta ) + this . y * Math . cos ( theta ) ) ; }
Rotates the vector in radians counterclockwise and returns a new vector.
@memberof Vec2#
@param {Number} theta - rotation angle (in radians)
@returns {Vec2}
Rotates the vector in radians counterclockwise and returns a new vector .