I’ve been using a function in my code from the FMath library called ClosestPointOnLine(). I had assumed that this function used the mathematical definition of a line, ie with no end points as opposed to a segment which does have end points. Esspecially since there is also a ClosestPointOnSegment() function.

However upon a closer look at the documentation for ClosestPointOnLine it reads: *Find the point on line segment from LineStart to LineEnd which is closest to Point*.

This seems somewhat misleading as it’s not what I would expect a function called ClosestPointOnLine to do. As far as I can tell this function does the exact same thing as ClosestPointOnSegment.

Is this intentional or by mistake? Is there any way to find the closest point on a line as defined by two vectors?