This library is my personal collection of helper functions in creative coding, revolving around modulation, array functions, random numbers, etc.
mapRange :: toRange -> tromRange -> value -> Number
Map v in fromRange
to fromRange
sinMap :: toRange -> Divisor -> Number
Map the output sin(v / div) to toRange
cosMap :: toRange -> Divisor -> Number
Map the output cos(v / div) to toRange
if v is greater than M or less than m, wrap the value around to stay in this range
Return a deep copy array a
Create an array of size s
get1dY :: Columns -> Index -> Number
Get the Y component of a 1d array containing 2d data when the index is i
get1dX :: Columns -> Index -> Number
Get the X component of a 1d array containing 2d data when the index is i
pick a random element from the array a
get an array without a specific member
compose(choose, without)
rndB :: Range -> Number
Random number in range
rndIntB :: Range -> Number
Random integer in range
Polutes the global scope with unnamespaced functions