@thi.ng/grid-iterators
Version:
2D grid and shape iterators w/ multiple orderings
15 lines • 542 B
TypeScript
import type { GridIterOpts2D } from "./api.js";
/**
* Filtered version of {@link diagonal2d}, only including end points of the
* diagonals. Unless `all` option is enabled (default: false), the very first
* and last points are skipped, i.e. `[0,0]` and `[cols-1, rows-1]`.
*
* @remarks
* `cols` and `rows` MUST be both >= 2.
*
* @param opts -
*/
export declare function diagonalEnds2d(opts: GridIterOpts2D & {
all?: boolean;
}): Generator<import("./api.js").GridCoord2D, void, unknown>;
//# sourceMappingURL=diagonal-ends.d.ts.map