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)
| 86 | |
| 87 | |
| 88 | def _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 | |
| 94 | def _round_up(v: float, m: float) -> float: |