divide.js 328 B

123456789101112131415
  1. var helperNumberDivide = require('./helperNumberDivide')
  2. var toNumber = require('./toNumber')
  3. /**
  4. * 除法运算
  5. *
  6. * @param { Number } num1 数值1
  7. * @param { Number } num2 数值2
  8. * @return {Number}
  9. */
  10. function divide (num1, num2) {
  11. return helperNumberDivide(toNumber(num1), toNumber(num2))
  12. }
  13. module.exports = divide