Is there a better way to determine order of two line segments which intersect with a vertical line? the order is according to the y-coordinates of the points of intersection.
The naive approach is to caculate the intersection points and compare.