UNPKG

@thi.ng/grid-iterators

Version:

2D grid and shape iterators w/ multiple orderings

13 lines 595 B
import type { GridIterOpts2D } from "./api.js"; /** * Yields sequence of 2D grid coordinates in diagonal order starting at `[0,0]` * and using given `cols` and `rows`. Each diagonal starts at y=0 and progresses * in -x,+y direction. * * Ported & modified from original Java code by Christopher Kulla. * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/DiagonalBucketOrder.java * * @param opts - */ export declare function diagonal2d(opts: GridIterOpts2D): Generator<import("./api.js").GridCoord2D, void, unknown>; //# sourceMappingURL=diagonal.d.ts.map