maia-util
Version:
Utility math and music functions supporting various applications by Music Artificial Intelligence Algorithms, Inc.
17 lines (15 loc) • 483 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = get_random_arbitrary;
function get_random_arbitrary(min, max) {
// Mozilla 11/2015.
// In
// min Number mandatory
// max Number mandatory
// Out Number
// Returns a random number between min (inclusive) and max (exclusive).
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
return Math.random() * (max - min) + min;
}