causes a crash, more specifically an AssertionError.
I can understand that the desired result for this edge case might be arguable, but it should not crash everything. And since the coordinates in this case are integers, and the line segments are horizontal, there should not be any issues of "near-vertical segments" or numerical precision problems.
The following line
causes a crash, more specifically an
AssertionError
.I can understand that the desired result for this edge case might be arguable, but it should not crash everything. And since the coordinates in this case are integers, and the line segments are horizontal, there should not be any issues of "near-vertical segments" or numerical precision problems.