lerp function
Linear interpolation between start and stop by amount.
amount between 0 and 1, inclusive.
Implementation
double lerp(double start, double stop, double amount) {
assert(amount >= 0.0 && amount <= 1.0);
return (1.0 - amount) * start + amount * stop;
}