Example #1
0
        static void TestSqrt(ulong t)
        {
            var val = LMath.Sqrt64(t);

            UnityEngine.Debug.Log($"sqrt({t}) = {val}");
            return;
        }
Example #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));
        }