round 如果參數(shù)是小數(shù),則求本身的四舍五入.
ceil 如果參數(shù)是小數(shù)寂纪,則求最小的整數(shù)但不小于本身.
floor 如果參數(shù)是小數(shù)席吴,則求最大的整數(shù)但不大于本身.
round(3.4) --- 3 ceil(3.4) --- 4 floor(3.4) --- 3
round(3.5) --- 4 ceil(3.5) --- 4 floor(3.5) --- 3
round 如果參數(shù)是小數(shù),則求本身的四舍五入.
ceil 如果參數(shù)是小數(shù)寂纪,則求最小的整數(shù)但不小于本身.
floor 如果參數(shù)是小數(shù)席吴,則求最大的整數(shù)但不大于本身.
round(3.4) --- 3 ceil(3.4) --- 4 floor(3.4) --- 3
round(3.5) --- 4 ceil(3.5) --- 4 floor(3.5) --- 3