pub fn local_cells(
    map_size_lg: MapSizeLg,
    posi: usize
) -> impl Clone + Iterator<Item = usize>
Expand description

Iterate through all cells adjacent and including four chunks whose top-left point is posi. This isn’t just the immediate neighbors of a chunk plus the center, because it is designed to cover neighbors of a point in the chunk’s “interior.”

This is what’s used during cubic interpolation, for example, as it guarantees that for any point between the given chunk (on the top left) and its top-right/down-right/down neighbors, the twelve chunks surrounding this box (its “perimeter”) are also inspected.