You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

round.js 501B

1234567891011121314151617181920212223242526
  1. var createRound = require('./_createRound');
  2. /**
  3. * Computes `number` rounded to `precision`.
  4. *
  5. * @static
  6. * @memberOf _
  7. * @since 3.10.0
  8. * @category Math
  9. * @param {number} number The number to round.
  10. * @param {number} [precision=0] The precision to round to.
  11. * @returns {number} Returns the rounded number.
  12. * @example
  13. *
  14. * _.round(4.006);
  15. * // => 4
  16. *
  17. * _.round(4.006, 2);
  18. * // => 4.01
  19. *
  20. * _.round(4060, -2);
  21. * // => 4100
  22. */
  23. var round = createRound('round');
  24. module.exports = round;