I am struggling with the following question. I'd like to check if a point on a circle is between two other points to check if the point is in the boundary. It is easy to calculate when the boundary doesn't go over 360 degrees. But when the boundary goes over 360 degrees (e.g. 270° - 180°), the second point is smaller than the first point of the boundary. And then I don't know how to check if my point on the circle is between the boundary points, because I cannot check "first boundary point" < "my point" < "second boundary point".
Is there an easy way to check this? Either a mathematical function or an algorithm would be good.
You should put all of the angles involved into canonical form before testing. For example, let angles $a, b$ be given (corresponding to the locations of your two sector-limiting points). Reduce $a, b$ to the range $(0, 2\pi)$ by modulo operations. Then if $b<a$ add $2\pi$ to $b$. For each test, let us say of angle $c$, reduce $c$ to the range $(0, 2\pi)$, getting $c'$; if $c' < a$, add $2\pi$ to $c'$ getting $c_t$, else set $c_t=c'$. Then $c$ is between $a$ and $b$ if $a \le c_t \le b$.