java Math 方法
生活随笔
收集整理的這篇文章主要介紹了
java Math 方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Math.round(12.49)=12;
Math.round(12.50)=13;
Math.round(0.5)=1;
Math.round(0.49)=0;
Math.round(-0.51)=-1;
Math.round(-0.5)=0;
Math.floor(-0.50)=-1.0;
Math.floor(-0.001)=-1.0;
Math.floor(12.50)=12.0;
Math.floor(12.99)=12.0;
總結
以上是生活随笔為你收集整理的java Math 方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第九十八期:TIOBE11月榜单:C、S
- 下一篇: java velocity 语法_Vel