lerp static method

Implementation

static SceneColor lerp(SceneColor a, SceneColor b, double t) {
  int ch(int x, int y) => (x + (y - x) * t).round().clamp(0, 255);
  return SceneColor(
    (ch(a.alpha, b.alpha) << 24) |
        (ch(a.red, b.red) << 16) |
        (ch(a.green, b.green) << 8) |
        ch(a.blue, b.blue),
  );
}