fixed getIntersection for upside-down vertical lines