DieselDepot-APP/node_modules/es-toolkit/dist/compat/math/clamp.d.ts
SJCoetz def597c157 chore: add generated build artifacts and node module type files
add all Next.js build outputs and third-party dependency type declaration files
2026-07-20 01:18:42 +02:00

27 lines
No EOL
716 B
TypeScript

//#region src/compat/math/clamp.d.ts
/**
* Clamps a number within the specified bounds.
*
* @param number The number to clamp
* @param lower The lower bound
* @param upper The upper bound
* @returns Returns the clamped number
* @example
* clamp(3, 2, 4) // => 3
* clamp(0, 5, 10) // => 5
* clamp(15, 5, 10) // => 10
*/
declare function clamp(number: number, lower: number, upper: number): number;
/**
* Clamps a number to an upper bound.
*
* @param number The number to clamp
* @param upper The upper bound
* @returns Returns the clamped number
* @example
* clamp(5, 3) // => 3
* clamp(2, 3) // => 2
*/
declare function clamp(number: number, upper: number): number;
//#endregion
export { clamp };