Difference between revisions of "ReverseTPA"
From SCAR Divi Manual
Line 1: | Line 1: | ||
− | + | ==Definition== | |
+ | <source lang="scar" lines="false"> | ||
+ | procedure InvertTPA(var TPA: TPointArray); | ||
+ | </source> | ||
+ | |||
+ | ==Availability== | ||
+ | SCAR Divi 3.20b > Current | ||
+ | |||
+ | ===Aliases=== | ||
+ | *TPAInvert (SCAR Divi 3.26 > Current) | ||
+ | |||
+ | ==Description== | ||
+ | This function inverts a given [[TPointArray]] '''TPA''' by reversing the order of the coordinates contained in within it. | ||
+ | |||
+ | ==Example== | ||
+ | <source lang="scar"> | ||
+ | var | ||
+ | TPA: TPointArray; | ||
+ | |||
+ | begin | ||
+ | TPA := [Point(0, 0), Point(2, 2), Point(5, 10)]; | ||
+ | InvertTPA(TPA); | ||
+ | WriteLn('TPointArray: ' + TPAToStr(TPA)); | ||
+ | end. | ||
+ | </source> | ||
+ | |||
+ | Output: | ||
+ | TPointArray: (5,10);(2,2);(0,0) | ||
+ | |||
+ | ==See Also== | ||
+ | *[[TPASort]] | ||
+ | *[[TPASortEx]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] |
Revision as of 18:12, 20 October 2011
Definition
procedure InvertTPA(var TPA: TPointArray);
Availability
SCAR Divi 3.20b > Current
Aliases
- TPAInvert (SCAR Divi 3.26 > Current)
Description
This function inverts a given TPointArray TPA by reversing the order of the coordinates contained in within it.
Example
var TPA: TPointArray; begin TPA := [Point(0, 0), Point(2, 2), Point(5, 10)]; InvertTPA(TPA); WriteLn('TPointArray: ' + TPAToStr(TPA)); end.
Output:
TPointArray: (5,10);(2,2);(0,0)