import type { Curve, GlobalPoint, LineSegment, LocalPoint } from "./types"; /** * * @param a * @param b * @param c * @param d * @returns */ export declare function curve(a: Point, b: Point, c: Point, d: Point): Curve; export declare const bezierEquation: (c: Curve, t: number) => Point; /** * Computes the intersection between a cubic spline and a line segment. */ export declare function curveIntersectLineSegment(c: Curve, l: LineSegment, opts?: { tolerance?: number; iterLimit?: number; }): Point[]; /** * Finds the closest point on the Bezier curve from another point * * @param x * @param y * @param P0 * @param P1 * @param P2 * @param P3 * @param tolerance * @param maxLevel * @returns */ export declare function curveClosestPoint(c: Curve, p: Point, tolerance?: number): Point | null; /** * Determines the distance between a point and the closest point on the * Bezier curve. * * @param c The curve to test * @param p The point to measure from */ export declare function curvePointDistance(c: Curve, p: Point): number; /** * Determines if the parameter is a Curve */ export declare function isCurve

(v: unknown): v is Curve

; export declare function curveTangent([p0, p1, p2, p3]: Curve, t: number): import("./types").Vector; export declare function curveCatmullRomQuadraticApproxPoints(points: GlobalPoint[], tension?: number): [GlobalPoint, GlobalPoint][] | undefined; export declare function curveCatmullRomCubicApproxPoints(points: Point[], tension?: number): Curve[] | undefined; export declare function curveOffsetPoints([p0, p1, p2, p3]: Curve, offset: number, steps?: number): GlobalPoint[]; export declare function offsetPointsForQuadraticBezier(p0: GlobalPoint, p1: GlobalPoint, p2: GlobalPoint, offsetDist: number, steps?: number): GlobalPoint[]; /** * Implementation based on Legendre-Gauss quadrature for more accurate arc * length calculation. * * Reference: https://pomax.github.io/bezierinfo/#arclength * * @param c The curve to calculate the length of * @returns The approximated length of the curve */ export declare function curveLength

(c: Curve

): number; /** * Calculates the curve length from t=0 to t=parameter using the same * Legendre-Gauss quadrature method used in curveLength * * @param c The curve to calculate the partial length for * @param t The parameter value (0 to 1) to calculate length up to * @returns The length of the curve from beginning to parameter t */ export declare function curveLengthAtParameter

(c: Curve

, t: number): number; /** * Calculates the point at a specific percentage of a curve's total length * using binary search for improved efficiency and accuracy. * * @param c The curve to calculate point on * @param percent A value between 0 and 1 representing the percentage of the curve's length * @returns The point at the specified percentage of curve length */ export declare function curvePointAtLength

(c: Curve

, percent: number): P;