lerp method

double lerp(
  1. double end,
  2. double t
)

Linear interpolation between this value and end at t.

Example:

double start = 10.0;
double result = start.lerp(20.0, 0.5); // 15.0

Implementation

double lerp(double end, double t) => this + (end - this) * t;