public static Signal <T, float> Blend <T> (this Signal <T, float> signal, Signal <T, float> other, float blendFactor) { if (blendFactor < 0f || blendFactor > 1f) { throw new ArgumentException("Blend factor must be in range [0, 1]"); } return(signal.Combine(other, (x, y) => FMath.Mix(x, y, blendFactor))); }
public static Signal <T, float> Mask <T> (this Signal <T, float> signal, Signal <T, float> other, Signal <T, float> mask) { return(signal.Combine(other, mask, (x, y, m) => FMath.Mix(x, y, m))); }