MCPcopy Index your code
hub / github.com/qiyuangong/leetcode / isRectangleOverlap

Method isRectangleOverlap

java/836_Rectangle_Overlap.java:17–21  ·  view source on GitHub ↗
(int[] rec1, int[] rec2)

Source from the content-addressed store, hash-verified

15 }*/
16
17 public boolean isRectangleOverlap(int[] rec1, int[] rec2) {
18 // Check area
19 return (Math.min(rec1[2], rec2[2]) > Math.max(rec1[0], rec2[0]) && // width > 0
20 Math.min(rec1[3], rec2[3]) > Math.max(rec1[1], rec2[1])); // height > 0
21 }
22}

Callers

nothing calls this directly

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected