Rectangle Intersection Demonstration


A.X1 < B.X2:
A.X2 > B.X1:
A.Y1 < B.Y2:
A.Y2 > B.Y1:
Intersect:

A

(x1,y1)

(x2,y2)

B

(x1,y1)

(x2,y2)