Difference between revisions of "SortTPAEx"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> procedure SortTPAEx(var TPA: TPointArray; const Point: TPoint); </source> ==Availability== SCAR Divi 3.28 > Current ===Aliases...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
===Aliases=== | ===Aliases=== | ||
− | *TPASortEx (SCAR Divi 3.26 > | + | *TPASortEx (SCAR Divi 3.26 > 3.37) |
+ | |||
+ | ===Notes=== | ||
+ | *Before 3.37.02, this function threw exceptions for points with large coordinate values (over +/- 30000 in either direction from 0) | ||
==Description== | ==Description== | ||
Line 21: | Line 24: | ||
TPA := [Point(2, 2), Point(0, 0), Point(5, 10), Point(0, 0)]; | TPA := [Point(2, 2), Point(0, 0), Point(5, 10), Point(0, 0)]; | ||
SortTPAEx(TPA, Point(3, 3)); | SortTPAEx(TPA, Point(3, 3)); | ||
− | WriteLn( | + | WriteLn(TPAToStr(TPA)); |
end. | end. | ||
</source> | </source> | ||
Output: | Output: | ||
− | + | (2,2);(0,0);(0,0);(5,10) | |
==See Also== | ==See Also== | ||
*[[SortTPA]] | *[[SortTPA]] | ||
− | *[[ | + | *[[SortTPAByRow]] |
+ | *[[SortTPASpiralEx]] | ||
+ | *[[SortATPABySize]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] |
Latest revision as of 14:10, 26 November 2012
Definition
procedure SortTPAEx(var TPA: TPointArray; const Point: TPoint);
Availability
SCAR Divi 3.28 > Current
Aliases
- TPASortEx (SCAR Divi 3.26 > 3.37)
Notes
- Before 3.37.02, this function threw exceptions for points with large coordinate values (over +/- 30000 in either direction from 0)
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)