aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/baseRandom.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/baseRandom.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/baseRandom.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/baseRandom.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/baseRandom.js
new file mode 100644
index 00000000..fa3326cd
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/baseRandom.js
@@ -0,0 +1,18 @@
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeRandom = Math.random;
+
+/**
+ * The base implementation of `_.random` without support for argument juggling
+ * and returning floating-point numbers.
+ *
+ * @private
+ * @param {number} min The minimum possible value.
+ * @param {number} max The maximum possible value.
+ * @returns {number} Returns the random number.
+ */
+function baseRandom(min, max) {
+ return min + nativeFloor(nativeRandom() * (max - min + 1));
+}
+
+module.exports = baseRandom;