AccidentalNoise.ImplicitSelect.Get C# (CSharp) Метод

Get() публичный Метод

public Get ( Double x, Double y ) : Double
x Double
y Double
Результат Double
        public override Double Get(Double x, Double y)
        {
            var value = this.Source.Get(x, y);
            var falloff = this.Falloff.Get(x, y);
            var threshold = this.Threshold.Get(x, y);

            if (falloff > 0.0)
            {
                if (value < (threshold - falloff))
                {
                    // Lies outside of falloff area below threshold, return first source
                    return this.Low.Get(x, y);
                }
                if (value > (threshold + falloff))
                {
                    // Lies outside of falloff area above threshold, return second source
                    return this.High.Get(x, y);
                }
                // Lies within falloff area.
                var lower = threshold - falloff;
                var upper = threshold + falloff;
                var blend = MathHelper.QuinticBlend((value - lower) / (upper - lower));
				return MathHelper.Lerp(blend, this.Low.Get(x, y), this.High.Get(x, y));
            }

            return (value < threshold ? this.Low.Get(x, y) : this.High.Get(x, y));
        }

Same methods

ImplicitSelect::Get ( Double x, Double y, Double z ) : Double
ImplicitSelect::Get ( Double x, Double y, Double z, Double w ) : Double
ImplicitSelect::Get ( Double x, Double y, Double z, Double w, Double u, Double v ) : Double
ImplicitSelect