This method calculates the distance of a LineType to a Curve only in case, when the distance is smaller then MaxDist else big will be returned. You can imagine a cylinders with radius MaxDist around the Curve. If now the line goes through the "curved" cylinder, then this is a good one and the distance will be calculated and returned.
distance