Math.floor() 表示向下取整,返回double类型 (floor---地板) Math.ceil() 表示向上取整,返回double类型 (ceil---天花板) Math.round() 四舍五入,返回int类型 转载于:https://www.cnblogs.com/sunyubin/p/9721920.html