Page MenuHome

mathutils.geometry.intersect_line_line_2d doesn't operate on lines, but on line segments
Closed, ResolvedPublic


The function mathutils.geometry.intersect_line_line_2d is described as "Takes 2 lines (as 4 vectors) and returns a vector for their point of intersection or None". However, it does *not* intersect lines. It intersects line segments. To add to the confusion, the 3D variant mathutils.geometry.intersect_line_line is described in the exact same way, but does intersect lines.

We should at least update the documentation for the functions to reflect this difference. In my opinion the name should change too, but this would introduce backward compatibilities.