opengl line sphere intersection

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

bool Intersection(float sphere[3], float line_start[3], float line_end[3], float radius)
if intersection return true;
else return false;

Im not worried about point of intersection, just if an intersection does exist.

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.