MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _grid_up

Function _grid_up

SLiCAP/schematic/subcircuit.py:88–91  ·  view source on GitHub ↗

Round ``v`` up to the next grid step, so the box edges and the pins derived from them (edge ± stub) all land on the grid and stay connectable.

(v: float)

Source from the content-addressed store, hash-verified

86
87
88def _grid_up(v: float) -> float:
89 """Round ``v`` up to the next grid step, so the box edges and the pins
90 derived from them (edge ± stub) all land on the grid and stay connectable."""
91 return math.ceil(v / GRID_SIZE) * GRID_SIZE
92
93
94def _round_up(v: float, m: float) -> float:

Callers 1

_min_halfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected