export type LngLat = [lng: number, lat: number]; /** Normalize to [0, 360). */ export declare const normalizeBearing: (bearing: number) => number; /** Smallest absolute difference between two bearings, in [0, 180]. */ export declare const angleDiffDeg: (a: number, b: number) => number; export declare const distanceMeters: (a: LngLat, b: LngLat) => number; /** Initial compass bearing from `from` to `to` (0 = north, clockwise). */ export declare const bearingDeg: (from: LngLat, to: LngLat) => number; export declare const destinationPoint: (from: LngLat, bearing: number, meters: number) => LngLat; export declare const lineLengthMeters: (line: LngLat[]) => number; export type PointOnLine = { point: LngLat; /** Index of the segment start vertex. */ segmentIndex: number; /** Bearing of that segment in line direction. */ bearing: number; }; /** Point `meters` along the line from its start (clamped to the line). */ export declare const pointAlongLine: (line: LngLat[], meters: number) => PointOnLine | null; /** * Closest point on the line to `point`. Uses a local equirectangular projection per segment, * which is precise enough at street scale. */ export declare const snapToLine: (line: LngLat[], point: LngLat) => PointOnLine | null;