3dSynth

Docs / SynthBlocks

Open in the interactive docs reader

Clamp

Constrains a value between a minimum and maximum. Use it as a safety guard on expressions to prevent extreme values.

Block

Interactive preview is available in the interactive reader.

Parameters

input
The value to constrain.
min
Lower bound — output will never go below this.
max
Upper bound — output will never go above this.

How it works

If the input is below min, Clamp returns min. If the input is above max, Clamp returns max. Otherwise, it passes the input through unchanged.