Function VectorMath.SqrDistancePointSegment

SqrDistancePointSegment (Vector3 a, Vector3 b, Vector3 p)

Returns the squared distance between p and the segment a-b.

Public Static
float SqrDistancePointSegment (

Vector3

a

Vector3

b

Vector3

p

)

Returns the squared distance between p and the segment a-b.

The line is not considered infinite.