public static double angle(Coordinate p0,Coordinate p1){
  double dx=p1.x - p0.x;
  double dy=p1.y - p0.y;
  return Math.atan2(dy,dx);
}

public static double angle ( Coordinate p0 , Coordinate p1 ) { double dx = p1 . x - p0 . x ; double dy = p1 . y - p0 . y ; return Math . atan2 ( dy , dx ) ; }
returns the angle of the vector from p0 to p1 , relative to the positive x - axis . the angle is normalized to be in the range [ - pi , pi ] .
