Looking for example code... I can find lots of ways to find the points of intersection, but not the rectangle solution im looking for (see picture)
The black rect is a tilemap, the red rect is the camera... Im looking to supply 2 rectangles (with four members - x,y,w,h), and receive back essentially the green rectangle in the examples.
also, what's this problem known as?