Add constrain and lerp methods to Std or Math
heuermh opened this issue · comments
The Processing language provides methods constrain()
and lerp()
that I often find useful.
constrain()
reference
http://processing.org/reference/constrain_.html
lerp()
reference
http://processing.org/reference/lerp_.html
These are also implemented in LiCK in Constrain and Interpolate classes as static methods
https://github.com/heuermh/lick/blob/master/Constrain.ck
https://github.com/heuermh/lick/blob/master/Interpolate.ck
It would be great if these could be added to the Std or Math libraries in ChucK.
Ok -- this is added in ccrma/chuck@0604f61
(Though with slightly different names)
looks great, thanks @spencersalazar