Fractrace.Formulas.LinearSin C# (CSharp) Method

LinearSin() protected method

protected LinearSin ( double angle ) : double
angle double
return double
        protected double LinearSin(double angle)
        {
            int angleInt = (int)(angle - 0.5);
            angleInt = angleInt / 2;
            angleInt = angleInt / 2;
            angle = angle - angleInt;
            if (angle > 3)
            {
                angle = angle - 3;
            }
            else
                if (angle > 1)
                    angle = 2 - angle;

            return angle - 1;
        }