Clamp

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.

Interface

Inputs

ParameterDetailsPossible Types
Value

The number to be clamped, which is restricted to the range between the minimum and maximum values.

Primary Input

f32
f64
string
u32
Min

The left (smaller) side of the range. The output is never less than this number.

Default: 0

f32
f64
string
u32
Max

The right (greater) side of the range. The output is never greater than this number.

Default: 0

f32
f64
string
u32

Outputs

ProductDetailsPossible Types
Result

The value produced by the node operation.

Primary Output

f64
f32
u32
string