def getDistanceToLineByPath(begin, end, path):
 distanceToLine = (-987654321.0)
 for point in path:
  distanceToLine = max(getDistanceToLine(begin, end, point), distanceToLine)
 return distanceToLine

def getDistanceToLineByPath ( begin , end , path ) : distanceToLine = ( - 987654321.0 ) for point in path : distanceToLine = max ( getDistanceToLine ( begin , end , point ) , distanceToLine ) return distanceToLine
get the maximum distance from a path to an infinite line .