diff options
Diffstat (limited to 'client/util.hpp')
| -rw-r--r-- | client/util.hpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/client/util.hpp b/client/util.hpp deleted file mode 100644 index 8e7d549..0000000 --- a/client/util.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once
-#include <random>
-
-namespace util
-{
- namespace {
- //make a random generator and seed it with a p random number
- static std::random_device rd;
- static std::mt19937 gen( rd( ) );
- }
-
- template < typename t >
- __forceinline t random_number( t min, t max ) {
- if constexpr( !std::is_integral_v< t > ) {
- std::uniform_real_distribution< t > dist( min, max );
- return dist( gen );
- }
- else {
- std::uniform_int_distribution< t > dist( min, max );
- return dist( gen );
- }
- }
-}
\ No newline at end of file |
