public static int GetAngle(int x, int y)
        {
            if (x == 0 && y == 0)
            {
                return(0);
            }

            if (x > 0 && y >= 0)
            {
                if (y >= x)
                {
                    return(90 - LogicMath.ATAN_TABLE[(x << 7) / y]);
                }

                return(LogicMath.ATAN_TABLE[(y << 7) / x]);
            }

            int num = LogicMath.Abs(x);

            if (x <= 0 && y > 0)
            {
                if (num < y)
                {
                    return(90 + LogicMath.ATAN_TABLE[(num << 7) / y]);
                }

                return(180 - LogicMath.ATAN_TABLE[(y << 7) / num]);
            }

            int num2 = LogicMath.Abs(y);

            if (x < 0 && y <= 0)
            {
                if (num2 >= num)
                {
                    if (num2 == 0)
                    {
                        return(0);
                    }

                    return(270 - LogicMath.ATAN_TABLE[(num << 7) / num2]);
                }

                return(180 + LogicMath.ATAN_TABLE[(num2 << 7) / num]);
            }

            if (num < num2)
            {
                return(270 + LogicMath.ATAN_TABLE[(num << 7) / num2]);
            }

            if (num == 0)
            {
                return(0);
            }

            return(LogicMath.NormalizeAngle360(360 - LogicMath.ATAN_TABLE[(num2 << 7) / num]));
        }
        public static int NormalizeAngle180(int angle)
        {
            angle = LogicMath.NormalizeAngle360(angle);

            if (angle >= 180)
            {
                return(angle - 360);
            }

            return(angle);
        }
        public static int Sin(int angleA, int angleB)
        {
            angleA = LogicMath.NormalizeAngle360(angleA);

            if (angleA < 180)
            {
                if (angleA > 90)
                {
                    angleA = 180 - angleA;
                }

                return(LogicMath.SIN_TABLE[angleA] * angleB / 1024);
            }

            angleA -= 180;

            if (angleA > 90)
            {
                angleA = 180 - angleA;
            }

            return(-LogicMath.SIN_TABLE[angleA] * angleB / 1024);
        }
        public static int Sin(int angle)
        {
            angle = LogicMath.NormalizeAngle360(angle);

            if (angle < 180)
            {
                if (angle > 90)
                {
                    angle = 180 - angle;
                }

                return(LogicMath.SIN_TABLE[angle]);
            }

            angle -= 180;

            if (angle > 90)
            {
                angle = 180 - angle;
            }

            return(-LogicMath.SIN_TABLE[angle]);
        }