diff --git a/src/math/random-data-generator/RandomDataGenerator.js b/src/math/random-data-generator/RandomDataGenerator.js index ac3775dc6..b2637cb39 100644 --- a/src/math/random-data-generator/RandomDataGenerator.js +++ b/src/math/random-data-generator/RandomDataGenerator.js @@ -390,7 +390,7 @@ var RandomDataGenerator = new Class({ */ weightedPick: function (array) { - return array[~~(Math.pow(this.frac(), 2) * array.length + 0.5)]; + return array[~~(Math.pow(this.frac(), 2) * (array.length - 0.5) + 0.5)]; }, /**