@microsoft/fast-colors > clamp
clamp() function
Ensures that an input number does not exceed a max value and is not less than a min value.
Signature:export declare function clamp(i: number, min: number, max: number): number;
Parameters
Parameter | Type | Description |
---|---|---|
i | number | the number to clamp |
min | number | the maximum (inclusive) value |
max | number | the minimum (inclusive) value |
number