Clamps Dictionary
n-exp-dev
Function
(n-exp-dev x max)
Return a random deviation factor, the deviation being exponentially interpolated between 1 for x = 0 and [1/max..max] for x = 1.
Arguments
x |
An input value in the range [0..1] to be interpolated. |
max |
The maximum deviation factor for x = 1; |
Examples
#+BEGIN_SRC lisp (n-exp-dev 0 4) ; => 1.0 (n-exp-dev 0.5 4) ; a random value exponentially distributed in the range [0.5..2.0] (n-exp-dev 1 4) ; a random value exponentially distributed in the range [0.25..4.0]
#+ENDSRC
Created: 2025-02-18 Di 12:58