标签:ima 数学 ati return param poi color double public
/// <summary> /// 小数保留位数处理 /// </summary> /// <param name="value">值</param> /// <param name="digitNum">保留位数</param> /// <param name="MR">数学舍入方法</param> /// <returns></returns> public static decimal MathRound(decimal value, int digitNum,MidpointRounding MR) { return Math.Round(value, digitNum, MR); } /// <summary> /// 小数保留位数处理(默认四舍六入五留双) /// </summary> /// <param name="value">值</param> /// <param name="digitNum">保留位数</param> /// <returns></returns> public static double MathRound(double value, int digitNum) { return (double)MathRound((decimal)value, digitNum, MidpointRounding.ToEven);//四舍六入五留双 }
标签:ima 数学 ati return param poi color double public
原文地址:https://www.cnblogs.com/Torey/p/7115384.html