lerpList static method

List<AnyShadow> lerpList(
  1. List<AnyShadow> a,
  2. List<AnyShadow> b,
  3. double t
)

Implementation

static List<AnyShadow> lerpList(
    List<AnyShadow> a,
    List<AnyShadow> b,
    double t,
    ) {
  final count = math.max(a.length, b.length);
  return List<AnyShadow>.generate(count, (index) {
    if (index >= a.length) return b[index];
    if (index >= b.length) return a[index];
    return lerp(a[index], b[index], t);
  }, growable: false);
}