segment Distance
Compute the distance between two line segments, clamping at the end points if needed.
Return
The segment distance result
Parameters
p1
Start of segment 1
q1
End of segment 1
p2
Start of segment 2
q2
End of segment 2
Compute the distance between two line segments, clamping at the end points if needed.
The segment distance result
Start of segment 1
End of segment 1
Start of segment 2
End of segment 2