Beispiel #1
0
        public static double Gamma(double value, double absmax, double gamma)
        {
            bool flag = false;

            if (value < 0.0)
            {
                flag = true;
            }
            double num1 = Mathd.Abs(value);

            if (num1 > absmax)
            {
                if (flag)
                {
                    return(-num1);
                }
                else
                {
                    return(num1);
                }
            }
            else
            {
                double num2 = Mathd.Pow(num1 / absmax, gamma) * absmax;
                if (flag)
                {
                    return(-num2);
                }
                else
                {
                    return(num2);
                }
            }
        }