Screen from a collision library I started working on last night for a current WIP.

The screen shows Line segment->Line segment, and circle->line segment. Which as far as algorithms go, is demonstrating ray->circle, line->line, circle->line, ray->line segment etc. etc.
The red box at the intersection of the two line segments is of course the line segment -> line segment intersection, and the red circle is intersecting the line segment on the left.

The screen shows Line segment->Line segment, and circle->line segment. Which as far as algorithms go, is demonstrating ray->circle, line->line, circle->line, ray->line segment etc. etc.
The red box at the intersection of the two line segments is of course the line segment -> line segment intersection, and the red circle is intersecting the line segment on the left.