* Convert a linear wrap position back to x,y coordinates.
(pos: number, cols: number)
| 46 | * Convert a linear wrap position back to x,y coordinates. |
| 47 | */ |
| 48 | function fromWrapPosition(pos: number, cols: number): { x: number; y: number } { |
| 49 | return { |
| 50 | x: pos % cols, |
| 51 | y: Math.floor(pos / cols) |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Compact items in wrap order, filling gaps from left-to-right, top-to-bottom. |
no outgoing calls
no test coverage detected
searching dependent graphs…