NewTOAPIA.Drawing.image_filter_spline36.calc_weight C# (CSharp) Method

calc_weight() public method

public calc_weight ( double x ) : double
x double
return double
        public double calc_weight(double x)
        {
            if (x < 1.0)
            {
                return ((13.0 / 11.0 * x - 453.0 / 209.0) * x - 3.0 / 209.0) * x + 1.0;
            }
            if (x < 2.0)
            {
                return ((-6.0 / 11.0 * (x - 1) + 270.0 / 209.0) * (x - 1) - 156.0 / 209.0) * (x - 1);
            }
            return ((1.0 / 11.0 * (x - 2) - 45.0 / 209.0) * (x - 2) + 26.0 / 209.0) * (x - 2);
        }
    };
image_filter_spline36