MCPcopy Create free account
hub / github.com/pyscript/pyscript / append_p

Function append_p

core/tests/manual/issue-2302/worker.py:72–82  ·  view source on GitHub ↗
(lines, p1, p2)

Source from the content-addressed store, hash-verified

70
71stats = {'maxx': 0, 'maxy': 0, 'minx': 0, 'miny': 0}
72def append_p(lines, p1, p2):
73 lines.append(p1[0])
74 lines.append(p1[1])
75 lines.append(0)
76 lines.append(p2[0])
77 lines.append(p2[1])
78 lines.append(0)
79 stats['maxy'] = max(p1[1], p2[1], stats['maxy'])
80 stats['miny'] = min(p1[1], p2[1], stats['miny'])
81 stats['maxx'] = max(p1[0], p2[0], stats['maxx'])
82 stats['minx'] = min(p1[0], p2[0], stats['minx'])
83
84def marching_squares(height_map, sq_threshold):
85 lines = array("d")

Callers 2

marching_squaresFunction · 0.70
grid_linesFunction · 0.70

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected