ArcBasicDocs

RectsOverlap

True if two rectangles overlap.

RectsOverlap ( x1,y1,width1,height1,x2,y2,width2,height2 )

Parameters

x1
the first rectangle's left edge.
y1
its top edge.
width1
its width.
height1
its height.
x2
the second rectangle's left edge.
y2
its top edge.
width2
its width.
height2
its height.

Description

Tells you whether two rectangles overlap: 1 if they do, 0 if they don't. The simplest and quickest collision test, and often good enough.

See also