Given right_top and left_bottom co-ordinates, write a program to find whether two rectangle intersects.
Make one rectangle sit at the origin. (r1)
Shift the other rectangle accordingly. (r2)
Then, n = check how many vertices of r2 lie inside r1.
For, n=1,2, r2 intersects r1.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks