Intersection of a Line and a Sphere is a MAXScript function for 3ds Max, developed by Royal Ghost. It is a MAXScript version of the function "Intersection of a Line and a Sphere (or circle)" written by Paul Bourke.
The function classifies the relationship between a line and a sphere using a discriminant. A value below 0 means the line does not intersect the sphere, a value of 0 means the line is tangent and meets the sphere at one point (u = -b/2a), and a value above 0 means the line intersects the sphere at two points. For line segments, the u parameters describe the case: both u values below 0 or above 1 indicate a segment outside the sphere, while one negative u and one above 1 indicate a segment inside it.
Its underlying math also carries conditions on the input points. No three combinations of the four points can be collinear, and all four points cannot be coplanar. The denominator (mb - ma) is zero only when the lines are parallel and coincident, in which case no circle results. The developer's link points to Paul Bourke's original geometry page.