/** * Clamps the given value between the given minimum and maximum number values. * @param value The number value to restrict inside the range defined by the min and max values. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns * - The given value if it is within the min and max range. * - The min value if the given value is less than the min. * - The max value if the given value is greater than the max value. */ export declare function clamp(value: number, min: number, max: number): number; /** * Create a clamp function for clamping the given value between given minimum and maximum number value. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns A clamp function. */ export declare function createClamp(min: number, max: number): (value: number) => number; /** * Clamps value between 0 and 1 and returns value. * If the value is negative then zero is returned. * If value is greater than one then one is returned. */ export declare const clamp01: (value: number) => number; /** * Clamps the given value between the given minimum and maximum number values. * Use `round(value)`, `ceil(min)` and `floor(max)`. * @param value The number value to restrict inside the range defined by the min and max values. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns * - The given value if it is within the min and max range. * - The min value if the given value is less than the min. * - The max value if the given value is greater than the max value. */ export declare function clampRound(value: number, min: number, max: number): number; /** * Create a clamp function for clamping the given value between given minimum and maximum number value. * Use `round(value)`, `ceil(min)` and `floor(max)`. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns A clamp function. */ export declare function createClampRound(min: number, max: number): (value: number) => number; /** * Clamps the given value between the given minimum and maximum number values. * Use `floor(value)`, `ceil(min)` and `floor(max)`. * @param value The number value to restrict inside the range defined by the min and max values. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns * - The given value if it is within the min and max range. * - The min value if the given value is less than the min. * - The max value if the given value is greater than the max value. */ export declare function clampFloor(value: number, min: number, max: number): number; /** * Create a clamp function for clamping the given value between given minimum and maximum number value. * Use `floor(value)`, `ceil(min)` and `floor(max)`. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns A clamp function. */ export declare function createClampFloor(min: number, max: number): (value: number) => number; /** * Clamps the given value between the given minimum and maximum number values. * Use `ceil(value)`, `ceil(min)` and `floor(max)`. * @param value The number value to restrict inside the range defined by the min and max values. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns * - The given value if it is within the min and max range. * - The min value if the given value is less than the min. * - The max value if the given value is greater than the max value. */ export declare function clampCeil(value: number, min: number, max: number): number; /** * Create a clamp function for clamping the given value between given minimum and maximum number value. * Use `ceil(value)`, `ceil(min)` and `floor(max)`. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns A clamp function. */ export declare function createClampCeil(min: number, max: number): (value: number) => number; /** * Clamps the given value between the given minimum and maximum number values. * Use `trunc(value)`, `ceil(min)` and `floor(max)`. * @param value The number value to restrict inside the range defined by the min and max values. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns * - The given value if it is within the min and max range. * - The min value if the given value is less than the min. * - The max value if the given value is greater than the max value. */ export declare function clampTrunc(value: number, min: number, max: number): number; /** * Create a clamp function for clamping the given value between given minimum and maximum number value. * Use `trunc(value)`, `ceil(min)` and `floor(max)`. * @param min The minimum number value to compare against. * @param max The maximum number value to compare against. * @returns A clamp function. */ export declare function createClampTrunc(min: number, max: number): (value: number) => number; //# sourceMappingURL=clamp.d.ts.map