AlemSnyder / Fun-Game

I am just practicing c++. Feal free to enjoy.
GNU General Public License v2.0
1 stars 0 forks source link

Use a better random number generator #56

Closed AlemSnyder closed 8 months ago

AlemSnyder commented 10 months ago

There are no guarantees as to the quality of the random sequence produced. In the past, some implementations of rand() have had serious shortcomings in the randomness, distribution and period of the sequence produced (in one well-known example, the low-order bit simply alternated between 1 and 0 between calls). rand() is not recommended for serious random-number generation needs. It is recommended to use C++11's random number generation facilities to replace rand(). (since C++11)

https://en.cppreference.com/w/cpp/numeric/random

AlemSnyder commented 8 months ago

57