The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



DistanceToSegment


Unit: SDL_math1
Class: None
Declaration: function DistanceToSegment (TestPoint, SegP1, SegP2: TPointDouble): double;

The function DistanceToSegment calculates the distance of the test point TestPoint from a line segment defined by its end points SegP1 and SegP2. The function returns the distance from the nearest element of the segment (either an endpoint or the line in between).


Last Update: 2023-Feb-06