UNPKG

grid-neighbors-1d

Version:

Get the 8 closest neighbors of a cell in a 2d grid when flattened to a 1d array

2 lines (1 loc) 15 B
# Contributors