Is the logic (especially intersects() and get_intersection()) based on infinite lines, or just line segments?