Files
powerpoint-toolbox/node_modules/@fluentui/react-utilities/lib/utils/clamp.js
T
2025-03-07 19:22:02 +01:00

9 lines
282 B
JavaScript

/**
* @internal
* Clamps `value` to a number between the min and max.
*
* @param value - the value to be clamped
* @param min - the lowest valid value
* @param max - the highest valid value
*/ export const clamp = (value, min, max)=>Math.max(min, Math.min(max, value || 0));