diff --git a/src/ccutil/helpers.h b/src/ccutil/helpers.h index 21241502..20a48201 100644 --- a/src/ccutil/helpers.h +++ b/src/ccutil/helpers.h @@ -68,7 +68,9 @@ inline const std::vector split(const std::string &s, char c) { return v; } -// A simple linear congruential random number generator. +// A simple linear congruential random number generator, +// using Knuth's constants from: +// http://en.wikipedia.org/wiki/Linear_congruential_generator. class TRand { public: // Sets the seed to the given value. @@ -95,7 +97,10 @@ public: } private: - std::minstd_rand e; + std::linear_congruential_engine e; }; // Remove newline (if any) at the end of the string.