aswi2020vldc-gitlab/templetes/node_modules/lodash/floor.js @ 10920ea3
1 |
var createRound = require('./_createRound'); |
---|---|
2 |
|
3 |
/**
|
4 |
* Computes `number` rounded down to `precision`.
|
5 |
*
|
6 |
* @static
|
7 |
* @memberOf _
|
8 |
* @since 3.10.0
|
9 |
* @category Math
|
10 |
* @param {number} number The number to round down.
|
11 |
* @param {number} [precision=0] The precision to round down to.
|
12 |
* @returns {number} Returns the rounded down number.
|
13 |
* @example
|
14 |
*
|
15 |
* _.floor(4.006);
|
16 |
* // => 4
|
17 |
*
|
18 |
* _.floor(0.046, 2);
|
19 |
* // => 0.04
|
20 |
*
|
21 |
* _.floor(4060, -2);
|
22 |
* // => 4000
|
23 |
*/
|
24 |
var floor = createRound('floor'); |
25 |
|
26 |
module.exports = floor; |