该方式对于浮点数会做无条件舍去,失去精确度。 如果希望获取float的整数部分可以d = Math.Floor(c);. Math.Round:四舍六入五; Math.Ceiling:只要有小数都加1 Math.
確定! 回上一頁