using System;
namespace MECF.Framework.Common.MECF.Framework.Common.Utilities
{
    public static class DoubleExtensions
    {
        /// <summary>
        /// 取整到指定小数位。
        /// </summary>
        /// <param name="input"></param>
        /// <param name="round"></param>
        /// <returns></returns>
        public static double Round(this double input, int round)
        {
            return Math.Round(input, round);
        }
        
        /// <summary>
        /// 取整到指定小数位。
        /// </summary>
        /// <param name="input"></param>
        /// <param name="round"></param>
        /// <returns></returns>
        public static float Round(this float input, int round)
        {
            return (float)Math.Round(input, round);
        }
    }
}
