Math.ceil
数値の繰り下げ
構文
Math.ceil(x)
引数
x=数値例文
<html> <head> <title>Math.ceil</title> </head> <body> <!--数値の繰り下げのサンプル--> <script type="text/javascript"> document.write('0.60の切り上げ値は'+Math.ceil(0.60)+"です<br>"); document.write('0.40の切り上げ値は'+Math.ceil(0.40)+"です<br>"); document.write('5の切り上げ値は'+Math.ceil(5)+"です<br>"); document.write('5.1の切り上げ値は'+Math.ceil(5.1)+"です<br>"); document.write('-5.1の切り上げ値は'+Math.ceil(-5.1)+"です<br>"); document.write('-5.9の切り上げ値は'+Math.ceil(-5.9)+"です"); </script> </body> </html>
関連記事
- Math.tan
- Math.atan2
- Math.sqrt
- Math.sin
- Math.round
- Math.random
- Math.pow
- Math.min
- Math.max
- Math.log
- Math.floor
- Math.exp
- Math.cos
- Math.atan
- Math.asin
- Math.acos
- Math.abs
- Math.SQRT2
- Math.SQRT1_2
- Math.PI
- Math.LOG2E
- Math.LOG10E
- Math.LN2
- Math.LN10
- Math.E
スポンサーリンク