Clamp

Limits a number to a range.

Node id math/clamp

The Clamp node outputs value, unless it is outside the range from min to max: then it outputs the nearest end. With the default range, 0 to 1, 1.4 gives 1 and -0.2 gives 0.

Inputs

NameTypeDefaultNotes
valuenumber0
minnumber0
maxnumber1

Outputs

NameTypeNotes
resultnumber

Behaviour

  • Range. min defaults to 0 and max to 1.
  • An inverted range (min greater than max) is not an error: the result is always max.
  • Min and Max: limit a number on one side only.
  • Lerp: with a clamped t, stays between a and b.
  • Map Range: converts a number to another range, optionally clamped.
© 2026 Wirepaint