export interface SampledPoint { x: number; y: number; } export interface LengthTableEntry { /** Cumulative arc-length from start to this sample */ arcLen: number; /** The point at this sample */ point: SampledPoint; /** The parametric t value at this sample */ t: number; } export declare class PathLengthTable { /** Internal flat storage: [arcLen, x, y, t] × N — cache-friendly layout */ private readonly _data; /** Number of samples (including sample 0) */ readonly sampleCount: number; /** Total arc-length of the curve */ readonly totalLength: number; private constructor(); /** * Build a PathLengthTable by sampling a parametric curve. * * @param sample A function `(t: number) → {x, y}` for any t in [0, 1] * @param numSamples Number of uniform t-samples. 512 gives < 0.1% error * on typical flow-visualization curves. */ static build(sample: (t: number) => SampledPoint, numSamples?: number): PathLengthTable; /** * Sample the curve at a given arc-length distance. * Clamps `distance` to [0, totalLength]. * Uses binary search → O(log n). */ sampleAt(distance: number): SampledPoint & { t: number; }; /** * Convert an arc-length distance to a parametric t value. * Useful when you need t for a custom derivative/tangent calculation. */ tAtLength(distance: number): number; /** * Retrieve a raw entry by sample index (0 … sampleCount-1). * Useful for iterating the table for debugging or custom interpolation. */ entry(i: number): LengthTableEntry; /** Largest sample index i such that arcLen[i] ≤ target */ private _binarySearch; } //# sourceMappingURL=PathLengthTable.d.ts.map