espace Posted September 27, 2016 Share Posted September 27, 2016 hi, i would sort 100 random number between 0 and 200 but i must be certain that any number are NOT the same. how do you that ? Link to comment Share on other sites More sharing options...
tips4design Posted September 27, 2016 Share Posted September 27, 2016 Integers or floats? See this: http://stackoverflow.com/questions/6947612/generating-m-distinct-random-numbers-in-the-range-0-n-1 I would personally just shuffle the array containing all the possible numbers, get the first 100 and sort them. drhayes 1 Link to comment Share on other sites More sharing options...
espace Posted September 28, 2016 Author Share Posted September 28, 2016 wouaw, i have the impress to go back in study you use this so ? http://phaser.io/docs/2.3.0/Phaser.ArrayUtils.html#shuffle Link to comment Share on other sites More sharing options...
Recommended Posts