js取整

x = Math.floor(x);//去尾法

x = Math.round(x);//四舍五入法

x = Math.ceil(x);//进一法

posted @ 2020-09-19 16:26  棂信  阅读(116)  评论(0)    收藏  举报