min = 0;
}
if (!Random.rand)
- Random.setSeed(Math.floor(Math.random() * 1984));
+ Random.setSeed(Math.floor(Math.random() * 19840));
return Math.floor(Random.rand() * (max - min)) + min;
},
+ randBool: function() {
+ return Random.randInt(0, 2) == 0;
+ },
+
// Inspired by https://github.com/jashkenas/underscore
sample: function(arr, n) {
n = n || 1;