Enumerate all cell coordinates in an efficient manner. Runs left-to-right, top-to-bottom.
If end of grid is reached, behaviour depends on wrap:
wrap
import { Grids } from 'ixfx/geometry.js';// Enumerate each cell position, left-to-right, top-to-bottomfor (const cell of Grids.By.cells(grid)) { // cell will be { x, y }} Copy
import { Grids } from 'ixfx/geometry.js';// Enumerate each cell position, left-to-right, top-to-bottomfor (const cell of Grids.By.cells(grid)) { // cell will be { x, y }}
See also:
Grid to iterate over
Optional
Starting cell position (default: {x:0,y:0})
If true (default), iteration will wrap around through (0,0) when end of grid is reached.
Enumerate all cell coordinates in an efficient manner. Runs left-to-right, top-to-bottom.
If end of grid is reached, behaviour depends on
wrap
:See also: