lerp method

sh - The SH to interpolate with.

alpha - The alpha factor.

Linear interpolates between the given SH and this instance by the given alpha factor.

Implementation

SphericalHarmonics3 lerp(SphericalHarmonics3 sh, double alpha) {
  for (int i = 0; i < 9; i++) {
    coefficients[i].lerp(sh.coefficients[i], alpha);
  }

  return this;
}