经典指数          
原因
1977
浏览数
1
收藏数
 

Math.floor(-8.5)=( )
  • (float)-8.0
  • (long)-9
  • (long)-8
  • (double)-9.0

     举报   纠错  
 
切换
2 个答案

floor: 求小于参数的最大整数。返回double类型-----n. 地板,地面

         例如:Math.floor(-4.2) = -5.0

-----------------------------------------------------------

ceil:   求大于参数的最小整数。返回double类型-----vt. 装天花板;

         例如:Math.ceil(5.6) = 6.0

-----------------------------------------------------------

round: 对小数进行四舍五入后的结果。返回int类型

         例如:Math.round(-4.6) = -5

 
切换

函数返回为double类型,d

 
切换
撰写答案