VireoSDK icon indicating copy to clipboard operation
VireoSDK copied to clipboard

"Random" instruction should not use rand()

Open mehagar opened this issue 5 years ago • 0 comments

From http://www.cplusplus.com/reference/cstdlib/rand/:

"Notice though that this modulo operation does not generate uniformly distributed random numbers in the span (since in most cases this operation makes lower numbers slightly more likely)."

Instead, use the facilities in the <random> header to generate a uniform distribution.

mehagar avatar Mar 19 '19 18:03 mehagar