Favor lower numbers in make.number.any()

This commit is contained in:
pyoor 2017-07-20 15:30:11 -04:00
parent fa4546d8b6
commit a1aab62256

View file

@ -41,7 +41,7 @@ make.number = {
if (random.chance(2)) { if (random.chance(2)) {
return Math.abs(make.number.any()) return Math.abs(make.number.any())
} }
return Math.pow(2, random.number(65)) + random.number(3) - 1 return Math.pow(2, random.number(random.number(65))) + random.number(3) - 1
}, },
even: function (number) { even: function (number) {
return number % 2 === 1 ? ++number : number return number % 2 === 1 ? ++number : number