divide.js 491 B

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