AFAIS the method used above computes the relative projected length of the difference vector (between the line segment's start and the center of the circle) and the line segment. The result denotes the distance to the point on the segment and closest to the circle, and it is stored in variable t.
a) If there is just 1 intersection than t need to be between 0 and 1, because the closest point is also the intersection point.
b) If there are 2 intersections then the intersections are at distances t-dt and t+dt. Any of these need to be in the range [0,1] to be valid.