mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Bump to v3.10.0.
This commit is contained in:
26
math/floor.js
Normal file
26
math/floor.js
Normal file
@@ -0,0 +1,26 @@
|
||||
define(['../internal/createRound'], function(createRound) {
|
||||
|
||||
/**
|
||||
* Calculates `n` rounded down to `precision`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Math
|
||||
* @param {number} n The number to round down.
|
||||
* @param {number} [precision=0] The precision to round down to.
|
||||
* @returns {number} Returns the rounded down number.
|
||||
* @example
|
||||
*
|
||||
* _.floor(4.006);
|
||||
* // => 4
|
||||
*
|
||||
* _.floor(0.046, 2);
|
||||
* // => 0.04
|
||||
*
|
||||
* _.floor(4060, -2);
|
||||
* // => 4000
|
||||
*/
|
||||
var floor = createRound('floor');
|
||||
|
||||
return floor;
|
||||
});
|
||||
Reference in New Issue
Block a user