Clamps Dictionary
n-lin-dev
Function
(n-lin-dev x max)
Return a random deviation value, the deviation being linearly interpolated between 0 for x = 0 and [-max..max] for x = 1.
Arguments
x |
An input value in the range [0..1] to be interpolated. |
max |
The maximum deviation value for x = 1; |
Examples
#+BEGIN_SRC lisp (n-lin-dev 0 4) ; => 0 (n-lin-dev 0.5 4) ; a random value linearly distributed in the range [-2.0..2.0] (n-lin-dev 1 4) ; a random value linearly distributed in the range [-4.0..4.0]
#+ENDSRC
Created: 2025-06-08 So 16:56