upd
This commit is contained in:
parent
a2186366b8
commit
75eb05bd1a
7 changed files with 206 additions and 73 deletions
12
src/utils/random.hpp
Normal file
12
src/utils/random.hpp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <random>
|
||||
#include <chrono>
|
||||
|
||||
namespace utils::random {
|
||||
static inline std::mt19937_64 rnd(std::chrono::system_clock::now().time_since_epoch().count());
|
||||
|
||||
inline uint64_t RandInt(uint64_t max_n) {
|
||||
return rnd() % max_n;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue