21 lines
399 B
C++
21 lines
399 B
C++
#ifndef PORYGONLANG_RANDOM_HPP
|
|
#define PORYGONLANG_RANDOM_HPP
|
|
#include <random>
|
|
|
|
namespace Porygon::Utilities {
|
|
class Random {
|
|
static std::mt19937_64 _rng;
|
|
public:
|
|
static void Seed(uint64_t new_seed) {
|
|
_rng.seed(new_seed);
|
|
}
|
|
|
|
static inline int64_t Get() {
|
|
return _rng.operator()();
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
#endif //PORYGONLANG_RANDOM_HPP
|