Can anyone explain these two lines of function??
int getRandomNumber(int min, int max) { static const double fraction = 1.0 / (RAND_MAX + 1.0); return min + static_cast<int>((max - min + 1) * (rand() * fraction)); }
Aucun commentaire:
Enregistrer un commentaire