diff --git a/util.h b/util.h index df8fb88..e8ba046 100644 --- a/util.h +++ b/util.h @@ -3,6 +3,7 @@ #include #include +#include const double infinity = std::numeric_limits::infinity(); const double pi = 3.1415926535897932385; @@ -13,7 +14,7 @@ inline double degrees_to_radians(double degrees) { inline double random_double() { static std::uniform_real_distribution distribution(0.0, 1.0); - static std::mt19937 generator; + static std::mt19937 generator(std::time(nullptr)); return distribution(generator); }