UNPKG

@thi.ng/geom

Version:

Functional, polymorphic API for 2D geometry types & SVG generation

23 lines 604 B
import type { MultiFn2 } from "@thi.ng/defmulti"; import type { IShape } from "./api.js"; import { AABB } from "./api/aabb.js"; import { Rect } from "./api/rect.js"; /** * Function overrides for {@link union}. */ export type UnionFn = { (a: AABB, b: AABB): AABB; (a: Rect, b: Rect): Rect; } & MultiFn2<IShape, IShape, IShape>; /** * Computes shape "union" of given 2 shapes. * * @remarks * Currently only implemented for {@link AABB} and {@link Rect} to compute union * bounding boxes. * * @param a * @param b */ export declare const union: UnionFn; //# sourceMappingURL=union.d.ts.map