Пример #1
0
        public override double GetValue(double t)
        {
            // Read the values:
            double a = SourceModule1.GetValue(t);
            double b = SourceModule2.GetValue(t);

            // Blend factor:
            double blend = WeightModule.GetValue(t);

            // Blend now!
            return(a + ((b - a) * blend));
        }
Пример #2
0
 /// <summary>
 /// Returns the result of blending the output of the two source modules using the
 /// output of the weight module as the blending weight.
 /// </summary>
 public override double GetValue(double x, double y)
 {
     return(Loonim.Math.LinearInterpolate(SourceModule1.GetValue(x, y),
                                          SourceModule2.GetValue(x, y),
                                          (WeightModule.GetValue(x, y) + 1.0) / 2.0));
 }