MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / is_overlapping

Function is_overlapping

utils/wei_utils.py:755–765  ·  view source on GitHub ↗

Returns True if rectangles r1 and r2 overlap (strictly), False otherwise.

(r1, r2)

Source from the content-addressed store, hash-verified

753 return rect["top"] + rect["height"]
754
755 def is_overlapping(r1, r2):
756 """
757 Returns True if rectangles r1 and r2 overlap (strictly),
758 False otherwise.
759 """
760 return not (
761 right(r1) <= r2["left"]
762 or r1["left"] >= right(r2)
763 or bottom(r1) <= r2["top"]
764 or r1["top"] >= bottom(r2)
765 )
766
767 # 1) Check each subsection is within the main section
768 names_violating = set()

Callers 1

Calls 2

rightFunction · 0.85
bottomFunction · 0.85

Tested by

no test coverage detected