Math.floor(5.55) //向下取整 結果為5 Math.floor(5.99) //向下取整 結果為5 Math.ceil(5.21) //向上取整,結果為6 Math.ceil(5.88) //向上取整,結果為6 Math.round(5.78) //四舍五入 結果為6 Math.round(5.33) //結果為5
Math.floor(5.55) //向下取整 結果為5 Math.floor(5.99) //向下取整 結果為5 Math.ceil(5.21) //向上取整,結果為6 Math.ceil(5.88) //向上取整,結果為6 Math.round(5.78) //四舍五入 結果為6 Math.round(5.33) //結果為5
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。