舍掉小數取整:Math.floor(2.0)=2
舍掉小數取整:Math.floor(2.1)=2
舍掉小數取整:Math.floor(2.5)=2
舍掉小數取整:Math.floor(2.9)=2
舍掉小數取整:Math.floor(-2.0)=-2
舍掉小數取整:Math.floor(-2.1)=-3
舍掉小數取整:Math.floor(-2.5)=-3
舍掉小數取整:Math.floor(-2.9)=-3
四捨五入取整:Math.rint(2.0)=2
四捨五入取整:Math.rint(2.1)=2
四捨五入取整:Math.rint(2.5)=2
四捨五入取整:Math.rint(2.9)=3
四捨五入取整:Math.rint(-2.0)=-2
四捨五入取整:Math.rint(-2.1)=-2
四捨五入取整:Math.rint(-2.5)=-2
四捨五入取整:Math.rint(-2.9)=-3
湊整:Math.ceil(2.0)=2
湊整:Math.ceil(2.1)=3
湊整:Math.ceil(2.5)=3
湊整:Math.ceil(2.9)=3
湊整:Math.ceil(-2.0)=-2
湊整:Math.ceil(-2.1)=-2
湊整:Math.ceil(-2.5)=-2
湊整:Math.ceil(-2.9)=-2
四捨五入取整:Math.round(2.0)=2
四捨五入取整:Math.round(2.1)=2
四捨五入取整:Math.round(2.5)=3
四捨五入取整:Math.round(2.9)=3
四捨五入取整:Math.round(-2.0)=-2
四捨五入取整:Math.round(-2.1)=-2
四捨五入取整:Math.round(-2.5)=-2
四捨五入取整:Math.round(-2.9)=-3