/** * Interpolation and smoothing utilities for color palette generation */ import { Effect } from "effect"; import type { TransformationPattern } from "../pattern/pattern.js"; declare const InterpolationError_base: new = {}>(args: import("effect/Types").Equals extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "InterpolationError"; } & Readonly; /** Error when interpolation or smoothing operations fail */ export declare class InterpolationError extends InterpolationError_base<{ readonly message: string; readonly cause?: unknown; }> { } /** Degrees to radians conversion factor */ export declare const DEG_TO_RAD: number; /** Radians to degrees conversion factor */ export declare const RAD_TO_DEG: number; /** * Smooth the transformation pattern to ensure: * - Lightness is perfectly linear * - Chroma follows a smooth curve * - Hue is consistent (circular mean value) */ export declare const smoothPattern: (pattern: TransformationPattern) => Effect.Effect; /** Linear interpolation between two values */ export declare const lerp: (a: number, b: number, t: number) => number; /** Clamp a value between min and max */ export declare const clamp: (value: number, min: number, max: number) => number; /** * Calculate circular mean of angular values (handles wraparound at ±180°) * * Standard circular mean: convert angles to unit vectors, average, convert back. * This correctly handles values clustered around the ±180° boundary. * * For example: * - circularMean([-175, 175]) ≈ 180 (not 0) * - circularMean([10, 20, 30]) = 20 (same as linear mean) * * @param angles - Array of angles in degrees * @param onEmpty - Function to create error when array is empty */ export declare const circularMeanWith: (angles: ReadonlyArray, onEmpty: () => E) => Effect.Effect; export {}; //# sourceMappingURL=interpolation.d.ts.map