PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/website/source/php/math/ceil.html

http://github.com/kvz/phpjs
HTML | 36 lines | 35 code | 1 blank | 0 comment | 0 complexity | a9661a556a5400b4a09484fce45e7354 MD5 | raw file
  1. ---
  2. warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand'
  3. examples:
  4. - ceil(8723321.4)
  5. returns:
  6. - '8723322'
  7. dependencies: []
  8. authors:
  9. original by:
  10. - 'Onno Marsman (https://twitter.com/onnomarsman)'
  11. notes: []
  12. type: function
  13. layout: function
  14. title: PHP's ceil in JavaScript
  15. description: >-
  16. Heres what our current JavaScript equivalent to <a
  17. href="https://php.net/manual/en/function.ceil.php">PHP's ceil</a> looks like.
  18. function: ceil
  19. category: math
  20. language: php
  21. permalink: php/math/ceil/
  22. alias:
  23. - /functions/php/ceil/
  24. - /functions/math/ceil/
  25. - /php/ceil/
  26. - /functions/ceil/
  27. ---
  28. {% codeblock lang:javascript %}module.exports = function ceil (value) {
  29. // discuss at: https://locutus.io/php/ceil/
  30. // original by: Onno Marsman (https://twitter.com/onnomarsman)
  31. // example 1: ceil(8723321.4)
  32. // returns 1: 8723322
  33. return Math.ceil(value)
  34. }
  35. {% endcodeblock %}