TPASortEx

From SCAR Divi Manual
Revision as of 10:55, 3 September 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> procedure TPASortEx(var TPA: TPointArray; const Point: TPoint); </source> ==Availability== SCAR Divi 3.26 > Current ==Descript...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

procedure TPASortEx(var TPA: TPointArray; const Point: TPoint);

Availability

SCAR Divi 3.26 > Current

Description

Sorts a given TPointArray TPA by distance from a given TPoint Point using the fast ShellSort algorithm.

Example

var
  TPA: TPointArray;

begin
  TPA := [Point(2, 2), Point(0, 0), Point(5, 10), Point(0, 0)];
  TPASortEx(TPA, Point(3, 3));
  WriteLn('TPointArray: ' + TPAToStr(TPA));
end.

Output:

TPointArray: (2,2);(0,0);(0,0);(5,10)

See Also