The algorithm does not handle the case in which lines are overlapping. Consider, f.e: print(list(line_intersections([((0,0),(10,0)),((5,0),(15,0))])))