import type { Ring, Vec2 } from './types'; /** Standard shoelace sum / 2 over (x, z). NEGATIVE for a ring that is counter-clockwise seen from +Y. */ export declare function shoelaceArea(ring: readonly Vec2[]): number; /** Area seen from +Y: positive for an outer ring wound counter-clockwise from above, negative for a hole's winding. */ export declare function ringAreaFromAbove(ring: readonly Vec2[]): number; export declare function isCounterClockwiseFromAbove(ring: readonly Vec2[]): boolean; /** The ring wound counter-clockwise from above (a copy; the input is untouched). */ export declare function orientCounterClockwiseFromAbove(ring: readonly Vec2[]): Ring; /** The ring wound clockwise from above: how a hole is stored. */ export declare function orientClockwiseFromAbove(ring: readonly Vec2[]): Ring; export declare function ringBounds(points: readonly Vec2[]): [Vec2, Vec2]; export declare function polylineLength(points: readonly Vec2[]): number; export declare function isFiniteVec2(value: unknown): value is Vec2; /** Even-odd containment; points exactly on the boundary may land either side. */ export declare function pointInRing(point: Vec2, ring: readonly Vec2[]): boolean; /** True when the closed segments share any point: a proper crossing, a T, a shared endpoint or a collinear overlap. */ export declare function segmentsTouch(a: Vec2, b: Vec2, c: Vec2, d: Vec2): boolean; export interface RingIntersection { ringA: number; segmentA: number; ringB: number; segmentB: number; } /** * The first place any two rings, or a ring with itself, touch or cross: `null` for a clean polygon. Segment `i` of a ring * runs from point `i` to point `i+1` (wrapping). Neighbouring segments of one ring share a vertex by construction, so they * only count when they fold back over each other. A polygon with holes is clean when `[outer, ...holes]` returns null. */ export declare function findRingIntersection(rings: readonly (readonly Vec2[])[]): RingIntersection | null; export declare function ringSelfIntersection(ring: readonly Vec2[]): RingIntersection | null;