pub fn linexp<T: Float>(
value: T,
from_min: T,
from_max: T,
to_min: T,
to_max: T,
exponent: T,
) -> T
Expand description
Map an input value from one range to another with an exponential curve. It performs clipping on
the input value in the range of from_min
and from_max
.
Using generics, this function can map any type that implements the Float
trait.
Note: If the denominator is zero, the function will return to_min
to avoid division by zero.