1、向上进位取整。Math.Ceiling
例如: Math.Ceiling(3.5)=4; Math.Ceiling(3.2)=3;
2、向下舍位取整。Math.Floor
例如: Math.Floor(2.6)=2;
3、按指定位数的小数进行四舍五入。
Math.Round
例如:Math.Round(36.23654,2)=36.24; Math.Round(36.23255,2)=36.23;
微信扫一扫
1、向上进位取整。Math.Ceiling
例如: Math.Ceiling(3.5)=4; Math.Ceiling(3.2)=3;
2、向下舍位取整。Math.Floor
例如: Math.Floor(2.6)=2;
3、按指定位数的小数进行四舍五入。
Math.Round
例如:Math.Round(36.23654,2)=36.24; Math.Round(36.23255,2)=36.23;
相关推荐