NAME

wrap - mod-like command


SYNOPSIS

val = wrap(value, range)


DESCRIPTION

wrap returns the modulus of value, using range as the modulo; i.e. it will keep value within range by "wrapping" it around.

See also mod which apparently does the same thing.


ARGUMENTS
value, range
The parameters used to perform the "wrapping" (i.e. a mod b; in this case, value mod range) operation. Essentially wrap gives the remainder of dividing value into range. Modular (or "clock") arithmetic is very useful in western, 12-note/octave music.


EXAMPLES
   wrappedval = wrap(7, 12)

SEE ALSO

abs, log, pow, max, mod, min, round, trunc