clamp
Updated on August 22, 2024Source codeTests
createClamp
is a pipe that transforms a number to a number clamped between a min and max value.
Create clamp
Call createClamp
with these parameters to create your clamp
function:
Parameter
Type
Required
Description
min
number
Yes
The lower bound to clamp between.
max
number
Yes
The upper bound to clamp between.