clamp Namespace
Package: @esfx/fn
Functions
withComparer(comparer, allowNullishValues)
Creates a copy of clamp
for a specific Comparer
.
Declaration
function withComparer<T>(comparer: Comparer<T>, allowNullishValues: true): (min: T, max: T) => (value: T) => T;
Type Parameters
- T
Parameters
- comparer
- Comparer<T>
- allowNullishValues
- true
Returns
(min: T, max: T) => (value: T) => T
withComparer(comparer, allowNullishValues)
Creates a copy of clamp
for a specific Comparer
.
Declaration
function withComparer<T>(comparer: Comparer<T>, allowNullishValues?: boolean): (min: T, max: T) => (value: T) => T;
Type Parameters
- T
Parameters
- comparer
- Comparer<T>
- allowNullishValues
- boolean
Returns
(min: T, max: T) => (value: T) => T