Difference between revisions of "SortTPAEx"
From SCAR Divi Manual
Line 6: | Line 6: | ||
==Availability== | ==Availability== | ||
SCAR Divi 3.28 > Current | SCAR Divi 3.28 > Current | ||
+ | |||
+ | *Before 3.38, this function threw exceptions for points with large coordinate values (over +/- 30000 in either direction from 0) | ||
===Aliases=== | ===Aliases=== |
Revision as of 17:48, 25 November 2012
Definition
procedure SortTPAEx(var TPA: TPointArray; const Point: TPoint);
Availability
SCAR Divi 3.28 > Current
- Before 3.38, this function threw exceptions for points with large coordinate values (over +/- 30000 in either direction from 0)
Aliases
- TPASortEx (SCAR Divi 3.26 > 3.37)
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)]; SortTPAEx(TPA, Point(3, 3)); WriteLn(TPAToStr(TPA)); end.
Output:
(2,2);(0,0);(0,0);(5,10)