UNPKG

@carbon/ibm-security

Version:

Carbon for Cloud & Cognitive IBM Security UI components

14 lines (13 loc) 431 B
/** * @file Helper methods for randomly generating values. * @copyright IBM Security 2018 */ /** * Creates a random floating point number. * @param {number} [multiplier=1] The number to multiply by. * @returns {float} Random floating point number. */ export default (function () { var multiplier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; return Math.floor(Math.random() * multiplier); });