Is there any known approach to compute the intersection rectangle between two rectangles? I mean if the rectangle A is defined by (x1,y2, x2,y2) and B by (x3,y3, x4,y4), how do I compute the coordinates of the intersection rectangle C (x5,y5, x6,y6)?
Thanks.