JAVA3种取整函数

  1. 舍掉小数取整:Math.floor(3.5)=3
  2. 四舍五入取整:Math.rint(3.5)=4
  3. 进位取整:Math.ceil(3.1)=4
posted @ 2017-10-13 15:52  Mrt.L  阅读(330)  评论(0编辑  收藏  举报