1 #include "ge211_random.h" 9 static auto construct_engine()
12 auto time =
static_cast<random_device::result_type
>(
13 chrono::high_resolution_clock()
14 .now().time_since_epoch().count());
15 return mt19937_64(rd() ^ time);
19 : generator_{construct_engine()}
24 return up_to(1.0) < ptrue;
The game engine namespace.
bool random_bool(double ptrue=0.5)
Returns a random bool that is true with probability ptrue.