import type { Pt } from "./crowd.ts"; /** The length of a line, closed into a ring when `closed`. */ export declare function lineLength(points: readonly Pt[], closed: boolean): number; /** An open line with the points that lie within `tolerance` of the line between their neighbours taken out (Douglas and Peucker); the two ends are kept. */ export declare function simplifyLine(points: readonly Pt[], tolerance: number): Pt[]; /** A ring (the first point not repeated) made simpler as a line from its first point round to it again, so that the first point, the start of a lap, stays where it is. */ export declare function simplifyLoop(points: readonly Pt[], tolerance: number): Pt[]; /** Where on a line (closed when `closed`) the point nearest `p` is: the segment it is on (from point `i` to the next), how far round from the first point that is, the point itself and the distance to it. */ export declare function nearestOn(points: readonly Pt[], p: Pt, closed: boolean): { i: number; along: number; at: Pt; d: number; }; /** The point and the unit direction of a ring `along` units round from its first point (wrapped round the lap). */ export declare function pointAlong(points: readonly Pt[], along: number): { at: Pt; dir: Pt; }; /** * Which way a ring bends at `along`, worked out over `reach` either side: the unit direction of travel there and the side the bend turns to (`1` to the left of travel in a frame whose y grows down the page, as an SVG's does, * `-1` to the right, `0` straight). */ export declare function bendAt(points: readonly Pt[], along: number, reach: number): { dir: Pt; side: -1 | 0 | 1; }; /** The signed area of a ring (the shoelace sum, halved): positive when it runs clockwise on a page whose y grows down. */ export declare function signedAreaOf(points: readonly Pt[]): number;