Files
2026-04-09 13:19:47 -05:00

15 lines
516 B
TypeScript

declare module "polygon-clipping" {
export type Pair = [number, number]
export type Ring = Pair[]
export type Polygon = Ring[]
export type MultiPolygon = Polygon[]
type Geom = Polygon | MultiPolygon
export function intersection(geom: Geom, ...geoms: Geom[]): MultiPolygon
export function xor(geom: Geom, ...geoms: Geom[]): MultiPolygon
export function union(geom: Geom, ...geoms: Geom[]): MultiPolygon
export function difference(
subjectGeom: Geom,
...clipGeoms: Geom[]
): MultiPolygon
}