addScaledSH method

sh - The SH to add.

s - The scale factor.

A convenience method for performing add and scale at once.

Implementation

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

  return this;
}