public double angleTo(Vector2D op2){
  final double result=Math.atan2(op2.getY(),op2.getX()) - Math.atan2(this.y,this.x);
  return result < 0 ? result + 2 * Math.PI : result;
}

public double angleTo ( Vector2D op2 ) { final double result = Math . atan2 ( op2 . getY ( ) , op2 . getX ( ) ) - Math . atan2 ( this . y , this . x ) ; return result < 0 ? result + 2 * Math . PI : result ; }
calculates the angle between two vectors in radians . < br / > both vectors must be different from the zero - vector .
