Euclidean separation from the query point to p, in the input length unit, not squared distance.
Newly allocated projected point a + t*(b-a), in the supplied frame and length unit.
Dimensionless segment fraction clamped to [0,1]; zero for coincident endpoints under finite arithmetic.
Projection onto a finite segment; a zero-length segment remains its endpoint. Finite representable projection arithmetic is a caller premise; closest does not validate inputs or certify a distance bound under overflow.