clamp ( x min max -- y )
Factor handbook » The language » Objects » Linear order protocol

Prev:max ( obj1 obj2 -- obj )
Next:Linear order example


Vocabulary
math.order

Inputs
xan object
minan object
maxan object


Outputs
yan object


Word description
Outputs x if contained in the interval [min,max] or else outputs one of the endpoints.

Definition