Clamp
DataTarget independent
math.clampLimit X to the Min~Max range: below Min gives Min, above Max gives Max, otherwise X. Min/Max swap automatically if reversed.
Example use
For example, clamp 120 to 0–100 to get 100, then connect the result to a numeric input.
Node preview
Right-drag to pan and scroll to zoom. Expand inputs and edit parameters to see how ports change. This preview does not run the node; reopening the page restores the example.
Loading node preview…
Data inputs 3
- Value
valueNumber The value operated on; supply structured data of the type shown and see the node description for its role.
Default availableDefault:0- Minimum
minimumNumber The lower bound of the value range.
Default availableDefault:0- Maximum
maximumNumber The upper bound of the value range.
Default availableDefault:100
Data outputs 1
- Result
resultNumber The result of this data operation, with its type determined by the matching inputs.
Version and node identity
Version 1.0.0
sha256:3d9499646f9e6638e232cc33fc989c1bddc2f27f02f12a496779c975383ff128