HexapiBackground.IK.InverseKinematics.GetATan2 C# (CSharp) Method

GetATan2() private static method

private static GetATan2 ( double atanX, double atanY, double &xyhyp2 ) : double
atanX double
atanY double
xyhyp2 double
return double
        private static double GetATan2(double atanX, double atanY, out double xyhyp2)
        {
            double atan4;

            xyhyp2 = Math.Sqrt((atanX*atanX*TenThousand) + (atanY*atanY*TenThousand));

            var angleRad4 = GetArcCos((atanX*OneMillion)/xyhyp2);

            if (atanY < 0)
                atan4 = -angleRad4;
            else
                atan4 = angleRad4;

            return atan4;
        }