hclErp static method

LightSource? hclErp(
  1. LightSource? a,
  2. LightSource? b,
  3. double t
)

Implementation

static LightSource? hclErp(LightSource? a, LightSource? b, double t) {
  if (a == null && b == null) return null;
  if (a == null) return b;
  if (b == null) return a;
  if (a == b) return a;
  if (t == 0.0) return a;
  if (t == 1.0) return b;

  return LightSource(
    (a.dx != b.dx ? lerpDouble(a.dx, b.dx, t) : a.dx)!,
    (a.dy != b.dy ? lerpDouble(a.dy, b.dy, t) : a.dy)!,
  );
}