grid-neighbors-1d

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

Browse on unpkg