Rename random.index to random.item

This commit is contained in:
Christoph Diehl 2017-04-07 16:59:10 +02:00
parent e03a4b431e
commit ba5f56cd0b
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ var random = {
// Returns a float in [1, limit]. The logarithm has uniform distribution.
return Math.exp(random.float() * Math.log(limit));
},
index: function (list) {
item: function (list) {
if (!(list instanceof Array || (typeof list != "string" && "length" in list))) {
Utils.traceback();
throw new TypeError("random.index() received a non array type: '" + list + "'");