The clamp function (clamp) restricts a number to a specified range between a minimum and maximum value. The minimum and maximum values are automatically swapped if they are reversed.
With vec2 inputs, this applies separately to the X and Y components.
Interface
Inputs
| Parameter | Details | Possible Types |
|---|---|---|
| Value | The number to be clamped, which is restricted to the range between the minimum and maximum values. Primary Input | Integer[]IntegerNumber[]NumberString[]StringVec2[]Vec2 |
| Min | The left (smaller) side of the range. The output is never less than this number. Default: | Integer[]IntegerNumber[]NumberString[]StringVec2[]Vec2 |
| Max | The right (greater) side of the range. The output is never greater than this number. Default: | Integer[]IntegerNumber[]NumberString[]StringVec2[]Vec2 |
Outputs
| Product | Details | Possible Types |
|---|---|---|
| Result | The value produced by the node operation. Primary Output | NumberNumber[]IntegerInteger[]StringString[]Vec2Vec2[] |