Split ``n`` ports across the four sides (top, right, bottom, left) as evenly as possible, with any remainder filling sides in clockwise order.
(n: int)
| 96 | |
| 97 | |
| 98 | def _side_counts(n: int) -> list[int]: |
| 99 | """Split ``n`` ports across the four sides (top, right, bottom, left) as |
| 100 | evenly as possible, with any remainder filling sides in clockwise order.""" |
| 101 | base, rem = divmod(n, 4) |
| 102 | return [base + (1 if i < rem else 0) for i in range(4)] |
| 103 | |
| 104 | |
| 105 | def _min_half(placement: list) -> tuple[float, float]: |
no outgoing calls
no test coverage detected