예제 #1
0
        public static int Sqrt(int a)
        {
            if (a <= 0)
            {
                return(0);
            }

            return((int)LMath.Sqrt32((uint)a));
        }
예제 #2
0
        public static long Sqrt(long a)
        {
            if (a <= 0L)
            {
                return(0);
            }

            if (a <= (long)(0xffffffffu))
            {
                return((long)LMath.Sqrt32((uint)a));
            }

            return((long)LMath.Sqrt64((ulong)a));
        }