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
minnumberYes
The lower bound to clamp between.
maxnumberYes
The upper bound to clamp between.