floor取比自己小的整数:
Math.floor(11.4)=Math.floor(11.6)=11;
Math.floor(-11.4)=Math.floor(-11.6)=-12;
ceil取比自己大的整数:
Math.ceil(11.4)=Math.ceil(11.6)=12;
Math.ceil(-11.4)=Math.ceil(-11.6)=-11;
round比较公平(四舍五入):
Math.round(11.6)=Math.round(11.5)=12;
Math.round(-11.6)=Math.round(-11.5)=-12;
Math.round(11.4)=11;