1 |
3a515b92
|
cagy
|
var createMathOperation = require('./_createMathOperation');
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* Divide two numbers.
|
5 |
|
|
*
|
6 |
|
|
* @static
|
7 |
|
|
* @memberOf _
|
8 |
|
|
* @since 4.7.0
|
9 |
|
|
* @category Math
|
10 |
|
|
* @param {number} dividend The first number in a division.
|
11 |
|
|
* @param {number} divisor The second number in a division.
|
12 |
|
|
* @returns {number} Returns the quotient.
|
13 |
|
|
* @example
|
14 |
|
|
*
|
15 |
|
|
* _.divide(6, 4);
|
16 |
|
|
* // => 1.5
|
17 |
|
|
*/
|
18 |
|
|
var divide = createMathOperation(function(dividend, divisor) {
|
19 |
|
|
return dividend / divisor;
|
20 |
|
|
}, 1);
|
21 |
|
|
|
22 |
|
|
module.exports = divide;
|