main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
854 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | /**
|
---|
7 | * Returns the largest integer less than or equal to a given number.
|
---|
8 | *
|
---|
9 | * Note: floor(null) returns integer 0 and do not give a NaN error.
|
---|
10 | *
|
---|
11 | * @func floor
|
---|
12 | * @memberOf RA
|
---|
13 | * @since {@link https://char0n.github.io/ramda-adjunct/2.15.0|v2.15.0}
|
---|
14 | * @category Math
|
---|
15 | * @sig Number -> Number
|
---|
16 | * @param {number} number The number to floor
|
---|
17 | * @return {number} A number representing the largest integer less than or equal to the specified number
|
---|
18 | * @example
|
---|
19 | *
|
---|
20 | * RA.floor(45.95); //=> 45
|
---|
21 | * RA.floor(45.05); //=> 45
|
---|
22 | * RA.floor(4); //=> 4
|
---|
23 | * RA.floor(-45.05); //=> -46
|
---|
24 | * RA.floor(-45.95); //=> -46
|
---|
25 | * RA.floor(null); //=> 0
|
---|
26 | */
|
---|
27 |
|
---|
28 | var floor = (0, _ramda.curryN)(1, (0, _ramda.bind)(Math.floor, Math));
|
---|
29 | var _default = floor;
|
---|
30 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.