Handbook
Glossary
vclamp ( v min max -- w )
Factor handbook
»
The language
»
Numbers
»
Vector operations
»
Vector component- and bit-wise logic
Prev:
vmin ( u v -- w )
Next:
vsupremum ( seq -- vmax )
Vocabulary
math.vectors
Inputs
v
a
sequence
of
real
s
min
a
sequence
of
real
s
max
a
sequence
of
real
s
Outputs
w
a
sequence
of
real
s
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
USING:
kernel
;
IN:
math.vectors
:
vclamp
( v min max -- w )
rot
vmin
vmax
;
inline