Q: Rectangle Intersection - Find the Intersecting Rectangle
In the last post, we looked into methods to determine whether or not two given rectangles intersect each other. Lets go one step ahead this time and find the intersecting rectangle.
As in the previous post, I am basing the struct off of the Windows co-ordinate space, where the origin is on the top left of the screen. The x-axis moves towards the right and the y-axis moves towards the bottom.
Q: Rectangle Intersection: Determine if two given rectangles intersect each other or not
Definitions:
Intersect: Two Rectangles intersect each other if the share a common area.
Assumptions: