18 lines
256 B
C++
18 lines
256 B
C++
#include "misc/Random.h"
|
|
#include <random>
|
|
#include <ctime>
|
|
|
|
namespace td {
|
|
namespace utils {
|
|
|
|
void initRandomizer(){
|
|
srand(time(0));
|
|
}
|
|
|
|
std::uint64_t getRandomNumber(std::size_t max){
|
|
return rand() % max;
|
|
}
|
|
|
|
} // namespace utils
|
|
} // namespace td
|