As an alternative to Dario's idea (which should work as well), you can:
- Calculate the distances between the intersection point and the endpoints of the arc (referred to as
intdist1
and intdist2
).
- Calculate the distance between the endpoints of the arc (
arcdist
).
- If the arc is less than half of the circle (covers less than 180 degrees), then you know if the point is in the arc if
intdist1
and intdist2
are both less than arcdist
.
- Else, if the arc is greater than half the circle (covers more than 180 degrees), then you know if the point is in the arc if either
intdist1
or intdist2
are greater than arcdist
.
I'm guessing, since you haven't specified otherwise, that the arc between the endpoints goes the short way around. In that case, you don't need to worry about step 4 above.
The method fails though if you are using an arc that covers exactly 180 degrees of the circle. In that case you could break the 180 degrees arc into 90 degree arcs and check both of them I suppose.
Also, you can of course use the square of the distance for comparison of these distances to save yourself the square root. In addition, this method should be faster than calculating the angles because those involve using expensive inverse cosines.