The function calculates the squared distance from a point to a line segment. Using squared distances avoids costly square root operations and doesn't affect the result because we're only interested in relative distances.
The point from which distance is to be measured
The start point of the line segment
The end point of the line segment
The squared distance from the point to the line segment
Generated using TypeDoc