point.angleBetween(p1, p2)

Compute the angle (in degrees) between the line from this point to p1 and the line from this point to p2.

The ordering of points p1 and p2 is important. The function returns a value between 0 and 180 when the angle (in the direction from p1 to p2) is clockwise, and a value between 180 and 360 when the angle is counterclockwise. The function returns NaN if either of the points p1 and p2 is coincident with this point.