I am working on a simple project and I have this method:
public int generatePeople(float luck, int min, int max) {
SecureRandom sr = new SecureRandom();
int people = 0;
// generate random people
return people;
}
I would like to generate an amount of people between min and max, but the number of people increases or decreases depending on the variable luck, this should be similar to a Gaussian but I have no idea on how to do it on Java.
Aucun commentaire:
Enregistrer un commentaire