Rename make.numbers.number to make.numbers.any

This commit is contained in:
pyoor 2017-04-25 11:18:29 -04:00
parent 6adf8b4026
commit 9869c32457
4 changed files with 9 additions and 9 deletions

View file

@ -59,7 +59,7 @@ make.font = {
s += random.pick(make.font.weight) + " "; s += random.pick(make.font.weight) + " ";
} }
if (random.chance(4)) { if (random.chance(4)) {
s += make.numbers.number() + "/"; s += make.numbers.any() + "/";
} }
s += make.font.size(); s += make.font.size();
s += " "; s += " ";

View file

@ -42,10 +42,10 @@ make.network = {
return ["turn", "turns", "stun", "stuns"]; return ["turn", "turns", "stun", "stuns"];
}, },
randomIPv4: function () { randomIPv4: function () {
return random.pick([random.number(255), make.numbers.number]) + "." + return random.pick([random.number(255), make.numbers.any]) + "." +
random.pick([random.number(255), make.numbers.number]) + "." + random.pick([random.number(255), make.numbers.any]) + "." +
random.pick([random.number(255), make.numbers.number]) + "." + random.pick([random.number(255), make.numbers.any]) + "." +
random.pick([random.number(255), make.numbers.number]); random.pick([random.number(255), make.numbers.any]);
}, },
randomIPv6: function () { randomIPv6: function () {
return "[" + make.strings.stringFromBlocks([":", function () { return "[" + make.strings.stringFromBlocks([":", function () {

View file

@ -39,14 +39,14 @@ make.numbers = {
}, },
unsignedNumber: function () { unsignedNumber: function () {
if (random.chance(2)) { if (random.chance(2)) {
return Math.abs(make.numbers.number()); return Math.abs(make.numbers.any());
} }
return Math.pow(2, random.number(65)) + random.number(3) - 1; return Math.pow(2, random.number(65)) + random.number(3) - 1;
}, },
evenNumber: function (number) { evenNumber: function (number) {
return number % 2 === 1 ? ++number : number; return number % 2 === 1 ? ++number : number;
}, },
number: function () { anynumber: function () {
let value = random.choose([ let value = random.choose([
[10, make.numbers.float], [10, make.numbers.float],
[10, [make.numbers.rangeNumber, make.numbers.tinyNumber]], [10, [make.numbers.rangeNumber, make.numbers.tinyNumber]],

View file

@ -9,9 +9,9 @@ make.unit = {
]); ]);
}, },
length: function () { length: function () {
return make.numbers.number() + make.unit.units(); return make.numbers.any() + make.unit.units();
}, },
percent: function () { percent: function () {
return make.numbers.number() + "%"; return make.numbers.any() + "%";
}, },
}; };