lerpDuration function

Duration lerpDuration(
  1. Duration a,
  2. Duration b,
  3. double t
)

Linearly interpolate between two Durations.

Implementation

Duration lerpDuration(Duration a, Duration b, double t) {
  return Duration(
    microseconds: (a.inMicroseconds + (b.inMicroseconds - a.inMicroseconds) * t).round(),
  );
}