angleTo(v1, v2, direction) {
        var angle = this.angle(v1, v2);
        var angleLargeThanPI = this.direction(v1, v2) >= 0;

        if (direction) {
          if (angleLargeThanPI) {
            return Math.PI * 2 - angle;
          }

          return angle;
        }

        if (angleLargeThanPI) {
          return angle;
        }

        return Math.PI * 2 - angle;
      }
/**
       * Calculates the angle of two vector2's with direction
       *
       * @param {vector2} v1 the first operand
       * @param {vector2} v2 the second operand
       * @param {Boolean} direction the direction of two vector2's
       * @return {Number} angle of v1 and v2
       */
Calculates the angle of two vector2's with direction
@param {vector2} v1 the first operand
@param {vector2} v2 the second operand
@param {Boolean} direction the direction of two vector2's
@return {Number} angle of v1 and v2
Calculates the angle of two vector2 ' s with direction @param { vector2 } v1 the first operand @param { vector2 } v2 the second operand @param { Boolean } direction the direction of two vector2 ' s @return { Number } angle of v1 and v2
angleTo(v1, v2, direction) {
        var angle = this.angle(v1, v2);
        var angleLargeThanPI = this.direction(v1, v2) >= 0;
        if (direction) {
          if (angleLargeThanPI) {
            return Math.PI * 2 - angle;
          }
          return angle;
        }
        if (angleLargeThanPI) {
          return angle;
        }
        return Math.PI * 2 - angle;
      }
angleTo ( v1 , v2 , direction ) { var angle = this . angle ( v1 , v2 ) ; var angleLargeThanPI = this . direction ( v1 , v2 ) >= 0 ; if ( direction ) { if ( angleLargeThanPI ) { return Math . PI * 2 - angle ; } return angle ; } if ( angleLargeThanPI ) { return angle ; } return Math . PI * 2 - angle ; }
Calculates the angle of two vector2's with direction
 @param {vector2} v1 the first operand
 @param {vector2} v2 the second operand
 @param {Boolean} direction the direction of two vector2's
 @return {Number} angle of v1 and v2
Calculates the angle of two vector2 ' s with direction @param { vector2 } v1 the first operand @param { vector2 } v2 the second operand @param { Boolean } direction the direction of two vector2 ' s @return { Number } angle of v1 and v2