Here you can find the source of getRandomNumberBinary()
var getRandomNumberBinary = function() { var randomNumber = getRandomNumber(0, 15); var returnObject = { decimal: randomNumber, binario: pad(dec2bin(randomNumber), 4)} return returnObject; } var getRandomNumber = function (min, max){ return Math.floor(Math.random() * max + min); }
===
Number.prototype.getRandom = function(low, high){ 'use strict'; var randomNumber; if((low === undefined) || (high === undefined)){ low = 1; high = 10; randomNumber = Math.round(Math.random() * (high - low)) + low; return randomNumber; ...
Number.prototype.getRandom = function(low, high) { "use strict"; var randomNumber; if ((low === undefined) || (high === undefined)) { low = 1; high = 10; randomNumber = Math.round(Math.random() * (high - low)) + low; return randomNumber; ...
Random.getRandomInterval(min, max){
return Math.random() * (max - min) + min;
var getRandomNumber = function (min, max){ return Math.floor(Math.random() * max + min);
Number.prototype.randomMax = function() { return Math.floor(Math.random() * (this.valueOf() + 1));