export declare const interpolates: { number: (from: number, to: number, t: number) => number; }; /** * constrain n to the given range via min + max * * @param n - value * @param min - the minimum value to be returned * @param max - the maximum value to be returned * @returns the clamped value */ export declare function clamp(n: number, min: number, max: number): number; /** * constrain n to the given range, excluding the minimum, via modular arithmetic * * @param n - value * @param min - the minimum value to be returned, exclusive * @param max - the maximum value to be returned, inclusive * @returns constrained number */ export declare function wrap(n: number, min: number, max: number): number; /** * Return a unique numeric id, starting at 1 and incrementing with * each call. * * @returns unique numeric id. */ export declare function uniqueId(): number; /** * Given a destination object and optionally many source objects, * copy all properties from the source objects into the destination. * The last source object given overrides properties from previous * source objects. * * @param dest - destination object * @param sources - sources from which properties are pulled */ export declare function extend(dest: T, source: U): T & U; export declare function extend(dest: T, source1: U, source2: V): T & U & V; export declare function extend(dest: T, source1: U, source2: V, source3: W): T & U & V & W; export declare function extend(dest: Record, ...sources: Array): any; type KeysOfUnion = T extends T ? keyof T : never; /** * Given an object and a number of properties as strings, return version * of that object with only those properties. * * @param src - the object * @param properties - an array of property names chosen * to appear on the resulting object. * @returns object with limited properties. * @example * ```ts * let foo = { name: 'Charlie', age: 10 }; * let justName = pick(foo, ['name']); // justName = { name: 'Charlie' } * ``` */ export declare function pick(src: T, properties: Array>): Partial; /** * Makes optional keys required and add the the undefined type. * * ``` * interface Test { * foo: number; * bar?: number; * baz: number | undefined; * } * * Complete { * foo: number; * bar: number | undefined; * baz: number | undefined; * } * * ``` * * See https://medium.com/terria/typescript-transforming-optional-properties-to-required-properties-that-may-be-undefined-7482cb4e1585 */ export type Complete = { [P in keyof Required]: Pick extends Required> ? T[P] : T[P] | undefined; }; /** * Given given (x, y), (x1, y1) control points for a bezier curve, * return a function that interpolates along that curve. * * @param p1x - control point 1 x coordinate * @param p1y - control point 1 y coordinate * @param p2x - control point 2 x coordinate * @param p2y - control point 2 y coordinate */ export declare function bezier(p1x: number, p1y: number, p2x: number, p2y: number): (t: number) => number; /** * A default bezier-curve powered easing function with * control points (0.25, 0.1) and (0.25, 1) */ export declare const defaultEasing: (t: number) => number; export declare function warnOnce(message: string): void; /** * This method converts degrees to radians. * The return value is the radian value. * @param degrees - The number of degrees * @returns radians */ export declare function degreesToRadians(degrees: number): number; export {};