/**
 * Clamping a number to a range.
 *
 * @public
 * @param value - The number to clamp.
 * @param min - The minimum value of the range.
 * @param max - The maximum value of the range.
 * @returns The clamped number.
 */
export function clamp(value, min, max) {
    const noNegativeZero = (n) => Object.is(n, -0) ? 0 : n;
    if (value < min) {
        return noNegativeZero(min);
    }
    if (value > max) {
        return noNegativeZero(max);
    }
    return noNegativeZero(value);
}
//# sourceMappingURL=NumberExtensions.js.map