How do I define the correct arc of a circle?

98 Views Asked by At

A start and end point as well as another point on the arc are given, which together define an arc of a circle. The points are given in polar coordinates. When defining such an arc, how do I ensure that the starting angle (angle of the starting point) is always smaller than the ending angle (angle of the end point). In the below image following image you can see the starting angle is 45 degree and the ending point is 135 degree. If the angle of the another point is between 45 and 135 I want get the purpule arc, else the blue arc, but (for my tesselation pipline) I need to ensue that the starting angle i always lower than the ending angle.