lerp method Null safety

double lerp(
  1. double start,
  2. double stop,
  3. double amount
)

The linear interpolation function.

Returns start if amount = 0 and stop if amount = 1

Implementation

static double lerp(double start, double stop, double amount) {
  return (1.0 - amount) * start + amount * stop;
}