예제 #1
0
        private static double RoundLayoutValue(double value, double dpiScale)
        {
            double num;

            if (!AngleBorder.AreClose(dpiScale, 1.0))
            {
                num = Math.Round(value * dpiScale) / dpiScale;
                if (double.IsInfinity(num) || AngleBorder.AreClose(num, 1.7976931348623157E+308))
                {
                    num = value;
                }
            }
            else
            {
                num = Math.Round(value);
            }
            return(num);
        }