SimpleEngine/src/random.cpp

13 lines
266 B
C++

#include "random.h"
#include <random>
namespace simpleengine {
int random::RandomInt(int min, int max) {
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distr(min, max);
return distr(gen);
}
}