JavaScriptで小数を整数にする

1.floor
Math.floor(12.9999) = 12

2.ceil
Math.ceil(12.1) = 13;

3.round
Math.round(12.5) = 13
Math.round(12.4) = 12

JavaScript

Posted by arkgame