首页 > 技术文章 > c# 三种取整方法 向上取整 向下取整 四舍五入

deepalley 2020-07-16 15:01 原文

Math.Round:四舍六入五取整

Math.Ceiling:向上取整,只要有小数都加1

Math.Floor:向下取整,总是舍去小数

 

推荐阅读