pub fn detect_collision(
a: &[f64; 2],
b: &[f64; 2],
obstacle: &CircleObstacle,
) -> boolExpand description
Determines whether a line segment intersects a circle.
The line segment is defined by endpoints a and b.
The circle is defined by center c and radius.
Uses projection of circle center onto line segment to find closest point.