that’s why you don’t rank high in google, but there is a tool that can help you to create 100% unique content,

search for; Boorfe’s tips unlimited content ]]>

That doesn’t handle the crossing case for two rectangles. Corners need not be contained within the bounds of the other rectangle for an intersection to occur.

]]>r2->Bottom < r1->Top &&

r2->Top > r1->Bottom &&

r2->Left < r1->Right ]]>

The intersect condition is much simpler than how you have expressed in those 9 segments. There are really only 2 “segments” and you only need to check for one corner in each.

It is simple:

IF

TOPLEFT is in S1 || S2 || S4 || S5

AND

BOTTOMRIGHT is in S5 || S6 || S8 || S9

then you have intersecting rectangles.

The code has the same number of conditions as what the blog example has:

r2->Right > r1->Left &&

r2->Bottom Top &&

r2->Top > r1->Right &&

r2->Left Bottom