angle2C static method
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
.
@param p0 the initial point of the vector @param p1 the terminal point of the vector @return the normalized angle (in radians) that p0-p1 makes with the positive x-axis.
Implementation
static double angle2C(Coordinate p0, Coordinate p1) {
double dx = p1.x - p0.x;
double dy = p1.y - p0.y;
return math.atan2(dy, dx);
}