简体   繁体   English

C#中的舍入功能

[英]Rounding Functionality in C#

我们想对值是2.01然后3的函数进行四舍五入,当2.2在3.99时的3.99在3时在3.0然后3的情况下如何取整。

Math.Ceiling 数学天花板

Returns the smallest integer greater than or equal to the specified number. 返回大于或等于指定数字的最小整数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM