lerp static method

Linearly interpolates between two spacing configurations.

The t argument is a value between 0 and 1, where 0 returns the first spacing and 1 returns the second spacing.

Implementation

static RRulePickerSpacing? lerp(
  RRulePickerSpacing? a,
  RRulePickerSpacing? b,
  double t,
) {
  if (identical(a, b)) {
    return a;
  }

  if (a == null && b == null) {
    return null;
  }

  return RRulePickerSpacing(
    row: lerpDouble(a?.row, b?.row, t)!,
    column: lerpDouble(a?.column, b?.column, t)!,
  );
}