vclamp ( v min max -- w )
Factor handbook » The language » Numbers » Vector operations » Vector component- and bit-wise logic

Prev:vmin ( u v -- w )
Next:vmaximum ( seq -- vmax )


Vocabulary
math.vectors

Inputs
va sequence of reals
mina sequence of reals
maxa sequence of reals


Outputs
wa sequence of reals


Word description
Creates a sequence where each element is clamped to the minimum and maximum elements of the min and max sequences.

Examples
USING: math.vectors prettyprint ; { -10 30 120 } { 0 0 0 } { 100 100 100 } vclamp .
{ 0 30 100 }


Definition