/website/source/php/math/ceil.html
HTML | 37 lines | 36 code | 1 blank | 0 comment | 0 complexity | 89bfb2750a4977a8b470167eb63e4f72 MD5 | raw file
- ---
- warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand'
- examples:
- - ceil(8723321.4)
- estarget: es5
- returns:
- - '8723322'
- dependencies: []
- authors:
- original by:
- - 'Onno Marsman (https://twitter.com/onnomarsman)'
- notes: []
- type: function
- layout: function
- title: PHP's ceil in JavaScript
- description: >-
- Here’s what our current JavaScript equivalent to <a
- href="http://php.net/manual/en/function.ceil.php">PHP's ceil</a> looks like.
- function: ceil
- category: math
- language: php
- permalink: php/math/ceil/
- alias:
- - /functions/php/ceil/
- - /functions/math/ceil/
- - /php/ceil/
- - /functions/ceil/
- ---
- {% codeblock lang:javascript %}module.exports = function ceil (value) {
- // discuss at: http://locutus.io/php/ceil/
- // original by: Onno Marsman (https://twitter.com/onnomarsman)
- // example 1: ceil(8723321.4)
- // returns 1: 8723322
- return Math.ceil(value)
- }
- {% endcodeblock %}