lerpLog function

double lerpLog(
  1. double a,
  2. double b,
  3. double f
)

Interpolates ratios in log space, so a multiplier halfway between 1 and 4 is 2, not 2.5.

Implementation

double lerpLog(double a, double b, double f) =>
    math.exp(lerp(math.log(a), math.log(b), f));