MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / _intersection_area

Function _intersection_area

scripts/extract_pdf_assets.py:118–126  ·  view source on GitHub ↗
(
    a: tuple[float, float, float, float],
    b: tuple[float, float, float, float],
)

Source from the content-addressed store, hash-verified

116
117
118def _intersection_area(
119 a: tuple[float, float, float, float],
120 b: tuple[float, float, float, float],
121) -> float:
122 x0 = max(a[0], b[0])
123 y0 = max(a[1], b[1])
124 x1 = min(a[2], b[2])
125 y1 = min(a[3], b[3])
126 return _rect_area((x0, y0, x1, y1))
127
128
129def _rects_intersect(

Callers 4

_rects_intersectFunction · 0.85
_visual_signal_for_bboxFunction · 0.85

Calls 1

_rect_areaFunction · 0.85

Tested by

no test coverage detected