Difference between revisions of "TPAInTPA"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function TPAInTPA(const TPA1, TPA2: TPointArray): Boolean; </source> ==Availability== SCAR Divi 3.20 > Current ==Description==...")
 
 
Line 25: Line 25:
  
 
==See Also==
 
==See Also==
 +
*[[TPAInTPARel]]
 
*[[TPAContains]]
 
*[[TPAContains]]
  

Latest revision as of 01:17, 21 October 2011

Definition

function TPAInTPA(const TPA1, TPA2: TPointArray): Boolean;

Availability

SCAR Divi 3.20 > Current

Description

Returns true if all points in TPA1 are also part of TPA2. The function does not take into account duplicates.

Example

begin
  WriteLn(TPAInTPA([Point(0, 0), Point(1, 2), Point(5, 6)],
    [Point(-5, 2), Point(0, 0), Point(1, 2), Point(5, 6), Point(1, 3)]));
  WriteLn(TPAInTPA([Point(0, 0), Point(1, 2), Point(5, 6)],
    [Point(-5, 2), Point(1, 2), Point(5, 6), Point(1, 3)]));
end.

Output:

1
0

See Also