point.angleBetween(p1, p2)
Computes the angle (in degrees) between the line passing through the point and point p1
and the line passing through the point and point p2
. The ordering of points p1
and p2
is important. The function returns a value between 0 and 180 degrees when the angle is counterclockwise, and a value between 180 and 360 degrees when the angle is clockwise. The function returns NaN if any of the points p1
and p2
are coincident with this point.