TPADistToPoint
From SCAR Divi Manual
Definition
procedure TPADistToPoint(const TPA: TPointArray; const Point: TPoint; out MinDist, MaxDist: Extended);
Availability
SCAR Divi 3.37 > Current
Description
Calculates the minimum and maximum distance of the TPoint Point, to all of the points in the TPointArray TPA and returns the distances in MinDist and MaxDist. An extended version of this function is available as TPADistToPointEx.
Example
var MinDist, MaxDist: Extended; begin TPADistToPoint([Point(0, 0), Point(3, 0)], Point(1, 1), MinDist, MaxDist); WriteLn(MinDist); WriteLn(MaxDist); end.
Output:
1.4142135623731 2.23606797749979