Difference between revisions of "TPAUnique"
From SCAR Divi Manual
m (moved TPARemoveDupl to TPAUnique) |
|||
| Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
| − | procedure | + | procedure TPAUnique(var TPA: TPointArray); |
</source> | </source> | ||
==Availability== | ==Availability== | ||
| − | SCAR Divi 3.26 > Current | + | SCAR Divi 3.28 > Current |
| + | |||
| + | ===Aliases=== | ||
| + | *TPARemoveDupl (SCAR Divi 3.26 > Current) | ||
==Description== | ==Description== | ||
| Line 17: | Line 20: | ||
begin | begin | ||
TPA := [Point(0, 0), Point(2, 2), Point(5, 10), Point(0, 0)]; | TPA := [Point(0, 0), Point(2, 2), Point(5, 10), Point(0, 0)]; | ||
| − | + | TPAUnique(TPA); | |
| − | WriteLn( | + | WriteLn(TPAToStr(TPA)); |
end. | end. | ||
</source> | </source> | ||
Output: | Output: | ||
| − | + | (0,0);(2,2);(5,10) | |
==See Also== | ==See Also== | ||
*[[TPADelete]] | *[[TPADelete]] | ||
| − | *[[ | + | *[[TPARemove]] |
| − | *[[ | + | *[[TPARemoveEx]] |
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] | ||
Revision as of 10:19, 24 October 2011
Definition
procedure TPAUnique(var TPA: TPointArray);
Availability
SCAR Divi 3.28 > Current
Aliases
- TPARemoveDupl (SCAR Divi 3.26 > Current)
Description
This function removes all of the duplicate coordinates in a given TPointArray TPA.
Example
var TPA: TPointArray; begin TPA := [Point(0, 0), Point(2, 2), Point(5, 10), Point(0, 0)]; TPAUnique(TPA); WriteLn(TPAToStr(TPA)); end.
Output:
(0,0);(2,2);(5,10)