Rename random.index to random.item
This commit is contained in:
parent
e03a4b431e
commit
ba5f56cd0b
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ var random = {
|
||||||
// Returns a float in [1, limit]. The logarithm has uniform distribution.
|
// Returns a float in [1, limit]. The logarithm has uniform distribution.
|
||||||
return Math.exp(random.float() * Math.log(limit));
|
return Math.exp(random.float() * Math.log(limit));
|
||||||
},
|
},
|
||||||
index: function (list) {
|
item: function (list) {
|
||||||
if (!(list instanceof Array || (typeof list != "string" && "length" in list))) {
|
if (!(list instanceof Array || (typeof list != "string" && "length" in list))) {
|
||||||
Utils.traceback();
|
Utils.traceback();
|
||||||
throw new TypeError("random.index() received a non array type: '" + list + "'");
|
throw new TypeError("random.index() received a non array type: '" + list + "'");
|
||||||
|
|
Loading…
Reference in a new issue