MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / __add__

Method __add__

src/__init__.py:14316–14321  ·  view source on GitHub ↗
(self, q)

Source from the content-addressed store, hash-verified

14314 return abs(self.ul - self.ur) * abs(self.ul - self.ll)
14315
14316 def __add__(self, q):
14317 if hasattr(q, "__float__"):
14318 return Quad(self.ul + q, self.ur + q, self.ll + q, self.lr + q)
14319 if len(q) != 4:
14320 raise ValueError("Quad: bad seq len")
14321 return Quad(self.ul + q[0], self.ur + q[1], self.ll + q[2], self.lr + q[3])
14322
14323 def __bool__(self):
14324 return not self.is_empty

Callers 1

__add__Method · 0.45

Calls 1

QuadClass · 0.85

Tested by

no test coverage detected