MCPcopy Index your code
hub / github.com/clips/pattern / get_bound

Function get_bound

pattern/web/pdf/utils.py:70–78  ·  view source on GitHub ↗

Compute a minimal rectangle that covers all the points.

(pts)

Source from the content-addressed store, hash-verified

68
69# get_bound
70def get_bound(pts):
71 """Compute a minimal rectangle that covers all the points."""
72 (x0, y0, x1, y1) = (INF, INF, -INF, -INF)
73 for (x,y) in pts:
74 x0 = min(x0, x)
75 y0 = min(y0, y)
76 x1 = max(x1, x)
77 y1 = max(y1, y)
78 return (x0,y0,x1,y1)
79
80# pick
81def pick(seq, func, maxobj=None):

Callers 2

__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…