lerp method

  1. @useResult
FProgressMotion lerp(
  1. FProgressMotion other,
  2. double t
)

Linearly interpolate between this and another FProgressMotion using the given factor t.

Implementation

@useResult
FProgressMotion lerp(FProgressMotion other, double t) => FProgressMotion(
  period: t < 0.5 ? period : other.period,
  interval: t < 0.5 ? interval : other.interval,
  curve: t < 0.5 ? curve : other.curve,
  value: lerpDouble(value, other.value, t) ?? value,
);