pub fn segment_distance(
p1: Vec2,
q1: Vec2,
p2: Vec2,
q2: Vec2,
) -> SegmentDistanceResultExpand description
Compute the distance between two line segments, clamping at the end points if needed. (b2SegmentDistance)
Follows Ericson 5.1.9 Closest Points of Two Line Segments.