Math, asked by sriramsri6427, 1 year ago

Given coordinates of two rectangles find coordinates of intersecting rectangle.

Answers

Answered by smartygoose45
0

Step-by-step explanation:

rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bottom-left corner, and (x2, y2) are the coordinates of its top-right corner.

Two rectangles overlap if the area of their intersection is positive. To be clear, two rectangles that only touch at the corner or edges do not overlap.

Given two (axis-aligned) rectangles, return whether they overlap.

Similar questions