import { vec2 } from 'linearly'; export declare function toFixedSimple(a: number, fractionDigits?: number): string; export declare function normalizeOffset(offset: number, max: number): number; /** * Normalize an index to the range 0 to length - 1. Negative values are interpreted as offsets from the end. If the index is out of bounds, it is clamped to the nearest bound. */ export declare function normalizeIndex(index: number, length: number): number; /** * Memoizes a function that takes a single object argument, using a WeakMap. */ export declare function memoize(f: (arg: Arg) => ReturnType): (arg: Arg) => ReturnType; export type PartialBy = Omit & Partial>; /** * Minimize a function of two variables using the BFGS method. * @param f The objective function to minimize * @param initial The initial guess * @returns The pair of vec2 that minimizes the function */ export declare const minimizeVec2: (f: (v: vec2) => number, initial: vec2) => vec2; //# sourceMappingURL=utils.d.ts.map