1er commit
This commit is contained in:
17
src/misc/Random.cpp
Normal file
17
src/misc/Random.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user