1、向上進位取整。Math.Ceiling 例如: Math.Ceiling(32.6)=33; Math.Ceiling(32.0)=32; 2、向下舍位取整。Math.Floor 例如: Math.Floor(32.6)=32; 3、取指定位數(shù)的小數(shù)。Math.Round 例如:Math.Round(36.236,2)=36.24; Math.Round(36.232,2)=36.23; 例如:一本16開的書,計算對開了幾次。Math.Log(16,2)=4; |
|