I'm trying to locate a function written in C or C++ that will give me the intersection points of a line and a circle. I've downloaded several math libraries and have been googling most of the day. The closest I've gotten to my goal is this:
The problem is that this code is written in Lisp and I'm having a hard time translating it into C. It appears to do exactly what I want but I'm not confident that I will translate it correctly and will end up spending more hours debugging it only to never get it working at all.
Does anyone know where I can find some 2D line/circle intersection code in C/C++ that will give me the point(s) of intersection? Preferably platform-independent and library independent.