import type { SineCoefficient, TangentCoefficient } from "./geometry"; import type { Coord } from "@khanacademy/perseus-core"; export type AbsoluteValueCoefficient = [m: number, h: number, v: number]; export type NamedSineCoefficient = { amplitude: number; angularFrequency: number; phase: number; verticalOffset: number; }; export type NamedTangentCoefficient = { amplitude: number; angularFrequency: number; phase: number; verticalOffset: number; }; export declare function getSinusoidCoefficients(coords: ReadonlyArray): SineCoefficient; /** Coefficients for f(x) = a·ln(b·x + c). */ export type LogarithmCoefficient = { /** Vertical scale factor. */ a: number; /** Horizontal scale factor. */ b: number; /** Horizontal shift (determines vertical asymptote at x = −c/b). */ c: number; }; /** Coefficients for f(x) = a·eᵇˣ + c. */ export type ExponentialCoefficient = { /** Vertical scale factor (amplitude). */ a: number; /** Growth/decay rate (exponent coefficient). */ b: number; /** Vertical shift (horizontal asymptote y-value). */ c: number; }; /** * Returns the coefficients {a, b, c} for f(x) = a·eᵇˣ + c given two points * on the curve and a horizontal asymptote line. * * Returns undefined if the inputs are geometrically invalid (same x, a point * on the asymptote, or points on opposite sides of the asymptote). */ export declare function getExponentialCoefficients(coords: ReadonlyArray, asymptote: number): ExponentialCoefficient | undefined; /** * Returns the coefficients {a, b, c} for f(x) = a·ln(b·x + c) given two * points on the curve and the x-value of the vertical asymptote. * * Uses the inverse exponential approach: flip each coordinate (x, y) → (y, x), * compute exponential coefficients from the flipped points, then invert. * * Returns undefined if the inputs are geometrically invalid (same y, a point * on the asymptote, or points on opposite sides of the asymptote). */ export declare function getLogarithmCoefficients(coords: ReadonlyArray, asymptote: number): LogarithmCoefficient | undefined; export declare function getTangentCoefficients(coords: ReadonlyArray): TangentCoefficient; export type QuadraticCoefficient = [number, number, number]; export declare function getQuadraticCoefficients(coords: ReadonlyArray): QuadraticCoefficient; /** * Compute the coefficients [m, h, v] for f(x) = m * |x - h| + v from two * control points: p1 (vertex) and p2 (a point on one arm). */ export declare function getAbsoluteValueCoefficients(coords: ReadonlyArray): AbsoluteValueCoefficient;