source: node_modules/ramda-adjunct/es/ceil.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 725 bytes
Line 
1import { bind, curryN } from 'ramda';
2
3/**
4 * Returns the smallest integer greater than or equal to a given number.
5 *
6 * Note: ceil(null) returns integer 0 and does not give a NaN error.
7 *
8 * @func ceil
9 * @memberOf RA
10 * @since {@link https://char0n.github.io/ramda-adjunct/2.15.0|v2.15.0}
11 * @category Math
12 * @sig Number -> Number
13 * @param {number} number The number to ceil
14 * @return {number} The smallest integer greater than or equal to the given number
15 * @example
16 *
17 * RA.ceil(.95); //=> 1
18 * RA.ceil(4); //=> 4
19 * RA.ceil(7.004); //=> 8
20 * RA.ceil(-0.95); //=> -0
21 * RA.ceil(-4); //=> -4
22 * RA.ceil(-7.004); //=> -7
23 * RA.ceil(null); //=> 0
24 */
25
26var ceil = curryN(1, bind(Math.ceil, Math));
27export default ceil;
Note: See TracBrowser for help on using the repository browser.