/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h
Returns distance from a point to the closest point on a segment.
closest distance from Point to segment defined by (StartPoint, EndPoint).
static float PointDistToSegment ( const FVector & Point, const FVector & StartPoint, const FVector & EndPoint )