lerp function

double lerp(
  1. double a,
  2. double b,
  3. double n
)

Implementation

double lerp(double a, double b, double n) {
  return (1 - n) * a + n * b;
}