UNPKG

@thi.ng/grid-iterators

Version:

2D grid and shape iterators w/ multiple orderings

43 lines 1.12 kB
import type { FnU7, FnU8, Maybe, Tuple } from "@thi.ng/api"; /** * Filters points from `src` iterable to remove any falling outside the rect * defined by `left,top`..`right,bottom`. * * @param src - * @param left - * @param top - * @param right - * @param bottom - */ export declare function clipped(src: Iterable<number[]>, left: number, top: number, right: number, bottom: number): Generator<number[], void, unknown>; /** * Based on [thi.ng/geom-isec](https://thi.ng/geom-isec), but inlined to avoid * dependency. * * @param x - * @param y - * @param w - * @param h - * @param cx - * @param cy - * @param r - * * @internal */ export declare const intersectRectCircle: FnU7<number, boolean>; /** * Based on [`liangBarsky2Raw`](https://docs.thi.ng/umbrella/geom-clip-line/functions/liangBarsky2Raw.html), but with diff return type. * * @param ax - * @param ay - * @param bx - * @param by - * @param minx - * @param miny - * @param maxx - * @param maxy - * * @internal */ export declare const liangBarsky: FnU8<number, Maybe<Tuple<number, 4>>>; //# sourceMappingURL=clipping.d.ts.map