📌  相关文章
📜  c# 四舍五入到最接近的倍数 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:00.954000             🧑  作者: Mango

代码示例1
int value = 30;
int factor = 16;
int nearestMultiple = 
        (int)Math.Round(
             (value / (double)factor),
             MidpointRounding.AwayFromZero
         ) * factor;