中文
Node Documentation

Clamp

DataTarget independentmath.clamp

Limit 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

ValuevalueNumber

The value operated on; supply structured data of the type shown and see the node description for its role.

Default availableDefault: 0
MinimumminimumNumber

The lower bound of the value range.

Default availableDefault: 0
MaximummaximumNumber

The upper bound of the value range.

Default availableDefault: 100

Data outputs 1

ResultresultNumber

The result of this data operation, with its type determined by the matching inputs.

Version and node identity

Version 1.0.0

sha256:3d9499646f9e6638e232cc33fc989c1bddc2f27f02f12a496779c975383ff128