closestParameterOnSegment

Finds the parameter t where the distance between two poses is minimized.

This is useful for finding the closest point on a line segment between two poses.

Formula: \(t = \frac{(\mathbf{p} - \mathbf{a}) \cdot (\mathbf{b} - \mathbf{a})}{|\mathbf{b} - \mathbf{a}|^2}\)

Return

the parameter t clamped to 0, 1

Parameters

start

the starting pose

end

the ending pose