$onpoly: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Aca20031 (talk | contribs)
No edit summary
 
(No difference)

Latest revision as of 18:46, 11 May 2008

Returns $true if the two polygons overlap. $false otherwise.

$onpoly(n1,n2,x,y,x,y,...)
  • n1 is the number of points in the first polygon
  • n2 is the number of points in the second polygon
  • The rest of the parameters are the polygon points. If n1 = 5 and n2 = 3, there must be 8 X coordinates and 8 Y coordinates

Example

$onpoly(3,3,1,1,5,5,10,0,2,2,4,4,9,0)

Returns: $true (The two triangles overlap)