java的四舍五入及取整

四舍五入用 Math.round(double a);
向上取整用 Math.ceil(double a);
向下取整用 Math.floor(double a);

 

posted @ 2017-04-26 10:24  倾默  阅读(13708)  评论(0编辑  收藏  举报