Difference between revisions of "TPASort"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure TPASort(var TPA: TPointArray); </source> ==Availability== SCAR Divi 3.26 > Current ==Description== Sorts a given [[T...")
 
(Redirected page to SortTPA)
 
Line 1: Line 1:
==Definition==
+
#REDIRECT [[SortTPA]]
<source lang="scar" lines="false">
 
procedure TPASort(var TPA: TPointArray);
 
</source>
 
  
==Availability==
+
[[Category:Deprecated Functions]]
SCAR Divi 3.26 > Current
 
 
 
==Description==
 
Sorts a given [[TPointArray]] '''TPA''' by distance from the origin (0, 0) using the fast [http://en.wikipedia.org/wiki/Shell_sort ShellSort] algorithm. An extended function with additional functionality is available as [[TPASortEx]].
 
 
 
==Example==
 
<source lang="scar">
 
var
 
  TPA: TPointArray;
 
 
 
begin
 
  TPA := [Point(2, 2), Point(0, 0), Point(5, 10), Point(0, 0)];
 
  TPASort(TPA);
 
  WriteLn('TPointArray: ' + TPAToStr(TPA));
 
end.
 
</source>
 
 
 
Output:
 
TPointArray: (0,0);(0,0);(2,2);(5,10)
 
 
 
==See Also==
 
*[[TPASortEx]]
 
*[[ATPASortBySize]]
 
 
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 
[[Category:Array Functions]]
 

Latest revision as of 19:27, 20 October 2011

Redirect to: