Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: n-lin-dev , Previous: n-exp-zero , Up: N , Home: Overview

Clamps Dictionary

n-lin

Function

(n-lin x min max)

Return the linear interpolation for a normalized value in the range [min..max] as a float value.

Arguments

x An input value in the range [0..1] to be interpolated.
min The output value for x = 0.
max The output value for x = 1.

Examples

#+BEGIN_SRC lisp
(n-lin 0 10 20) ; => 10.0

(n-lin 0.5 10 20) ; => 15.0

(n-lin 1 10 20)  ; => 20.0

#+ENDSRC

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate