in my extremely exciting opengl project i need a function that works like this, to return an intersection for a sphere and line segment.

defined values:
sphere is the point where the sphere sits. x,y,z
line_start is the point where the line originates
line_end is the ending point of that line
readius is the radius of the sphere

ok i looked at that page, whatever usefull there has one half million dependancies, not something i want, just a simple function to calculate intersection or notâ€¦ as i said im not caring about point of intersectionâ€¦ just if intersection exists between a line and a sphere, surely someone can help! thanks.

Work out the length of the normal that you get from the centre of your sphere to the line. If the length of this normal is less than your sphere radius then you get an intersection. If you draw it on a bit of paper you will see what I mean.