vendredi 13 janvier 2017

Is the Math.random() method in java truly random?

I'm using the Math.random() method to assign 1 of 3 bitmaps to many object so they all look different when they appear on the screen by calling a random number then assigning a bitmap according to where that number lies between 0 and 1 for every object, but I keep seeing patterns like the same bitmap appearing in a row many times, is this just me looking for patterns where there are none? And is there a better way to randomise things like this?




Aucun commentaire:

Enregistrer un commentaire