Fork me on GitHub
C#之向上取整,向下取整,四舍五入

向上取整 向下取整 四舍五入

Math.Round:四舍六入五取整

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

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

 

 
 https://www.cnblogs.com/net-sky/category/1062168.html
posted on 2020-02-26 22:39  HackerVirus  阅读(348)  评论(0)    收藏  举报