code: private double cosInterpolate(final double Y1, final double Y2, final double MU) {
          final double MU2;
  
          MU2 = (1 - Math.cos(MU * Math.PI)) / 2;
          return (Y1 * (1 - MU2) + Y2 * MU2);
      }
docs: Returns the value smoothed by a cosinus interpolation function
  @param Y1
  @param Y2
  @param MU
  @return the value smoothed by a cosinus interpolation function