Math/ Algorithm/ JS: How to determine if 2+ rectangles intersect, given the TopLeft(x0, y0) and Bottom-Right(x1, y1) of each rectangle
问题 I come across this math problem which is needed to complete my application, so I'm asking for help. Given 2 (or more, but basically for 2) rectangles with 2 known points for each: Top-left(x1, y1) and Bottom-right(x2, y2) (I can find the length with these info, if it is a need to solve the problem). TL(x1, y1) +-----------------+ | | | | TL(x3, y3) | | +---------------------------+ +-----------------+ | | BR(x2, y2) +---------------------------+ BR(x4, y4) Is there anyway to determine if they