I struggle to find a solid solution to detect collisions between a circle and a segment of a circle. Imagine a field of view cone for an enemy playing with circles representing objects of interest.
The diagram below is what I drew to try to work out some possible cases, but I'm sure there are more.
I understand how to quickly eliminate extreme cases, I discard any goals that don’t collide with the whole circle, and any cases where the center of the main circle is within the target circle are automatically correct (E in the diagram).
I'm struggling to find a good way to check out the rest of the cases. I tried to compare the distances between the centers of the circle and the end points of the outer lines of the segments, and I tried to work out the angle of the center of the target circle from the center of the main circle and determine if it is inside the segment, but none of the methods are suitable for all cases.
In particular, it seems that he is scared if the target circle is close to the center but does not touch it (somewhere between E and B below) or the segment is narrower than the target circle (so that the center is inside the segment but both edges are outside it )
Is there a reliable way to do this?
Additional information: The segment is described by the position P, the orientation O (the value of which is the radius of the circle) and the size of the representation S.
My most successful attempt to spend time is to determine the angles of the vectors ca1 and ca2 and to check whether one of them lies between the angles of the vectors a1 and a2. This works in some cases, as described above, but not in situations where the target circle is larger than the segment.
Edit 2 After implementing the best offer from below, there is still a false positive that I am not sure how best to eliminate. See the pink chart below. The circle in the lower right column indicates that it collides with the segment because it limits the overlap of both half spaces and the main circle.




Final editing
After discovering another edge case (4th image), I settled on an approach that combines the top two answers from the bottom and seems to cover all the bases. I will describe it here for those who follow.
First, exclude anything that does not give a quick test with circle to circle.
Then check for a collision between the circle and the two outer lines of the segment. If it is, return true.
Finally, perform a pair of point-to-half-space tests using the center of the circle and two outer lines (as described by Gareth below). If it passes both of them, otherwise returns false.