rescale ( u -- v ) (original) (raw)
Vocabulary
math.statistics
Inputs
u | a sequence |
---|
Outputs
v | a sequence |
---|
Word description
Returns u rescaled to run from 0 to 1 over the range min to max.
Definition
USING: kernel math math.vectors ;
: rescale ( u -- v ) dup minmax over - [ v-n ] [ v/n ] bi* ;