public Vector2 rotate(float angle){
  float rad=angle * MathUtils.degreesToRadians;
  float cos=(float)Math.cos(rad);
  float sin=(float)Math.sin(rad);
  float newX=this.x * cos - this.y * sin;
  float newY=this.x * sin + this.y * cos;
  this.x=newX;
  this.y=newY;
  return this;
}

public Vector2 rotate ( float angle ) { float rad = angle * MathUtils . degreesToRadians ; float cos = ( float ) Math . cos ( rad ) ; float sin = ( float ) Math . sin ( rad ) ; float newX = this . x * cos - this . y * sin ; float newY = this . x * sin + this . y * cos ; this . x = newX ; this . y = newY ; return this ; }
rotates the vector2 by the given angle , counter - clockwise .
