* Snaps a single coordinate value to the nearest grid position
(value: number, gridSize: number)
| 36 | * Snaps a single coordinate value to the nearest grid position |
| 37 | */ |
| 38 | function snapToGrid(value: number, gridSize: number): number { |
| 39 | return Math.round(value / gridSize) * gridSize |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Snaps a position to the nearest grid point. |
no outgoing calls
no test coverage detected