Math is an internal object of javascript. The method of this object is mainly some mathematical calculation methods.
Floor: Downward Math.floor(12.9999) = 12
ceil: Upward Math.ceil(12.1) = 13;
round: Round up Math.round(12.5 ) = 13 Math.round(12.4) = 12
JS rounding, rounding up/down
Guess you like
Origin blog.csdn.net/weixin_46099269/article/details/111310695
Recommended
Ranking