lerp static method

FlSpot lerp(
  1. FlSpot a,
  2. FlSpot b,
  3. double t
)

Lerps a FlSpot based on t value, check Tween.lerp.

Implementation

static FlSpot lerp(FlSpot a, FlSpot b, double t) {
  if (a == FlSpot.nullSpot) {
    return b;
  }

  if (b == FlSpot.nullSpot) {
    return a;
  }

  return FlSpot(
    lerpDouble(a.x, b.x, t)!,
    lerpDouble(a.y, b.y, t)!,
  );
}