📜  四舍五入 swift 代码示例

📅  最后修改于: 2022-03-11 15:01:03.549000             🧑  作者: Mango

代码示例1
let number = 0.1
// Use ceil to remove the fractional part and round up.
let result = ceil(number)


let number1 = 1.1
// Use floor to remove the fractional part and round down.
let floor1 = floor(number1)