lerp method

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

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

Implementation

@useResult
FLabelMotion lerp(FLabelMotion other, double t) => .new(
  textStyleTransitionDuration: t < 0.5 ? textStyleTransitionDuration : other.textStyleTransitionDuration,
  textStyleTransitionCurve: t < 0.5 ? textStyleTransitionCurve : other.textStyleTransitionCurve,
  errorExpandDuration: t < 0.5 ? errorExpandDuration : other.errorExpandDuration,
  errorCollapseDuration: t < 0.5 ? errorCollapseDuration : other.errorCollapseDuration,
  errorExpandCurve: t < 0.5 ? errorExpandCurve : other.errorExpandCurve,
  errorCollapseCurve: t < 0.5 ? errorCollapseCurve : other.errorCollapseCurve,
  errorFadeInDuration: t < 0.5 ? errorFadeInDuration : other.errorFadeInDuration,
  errorFadeOutDuration: t < 0.5 ? errorFadeOutDuration : other.errorFadeOutDuration,
  errorFadeInCurve: t < 0.5 ? errorFadeInCurve : other.errorFadeInCurve,
  errorFadeOutCurve: t < 0.5 ? errorFadeOutCurve : other.errorFadeOutCurve,
  errorFadeTween: t < 0.5 ? errorFadeTween : other.errorFadeTween,
);