acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
random_number_generator.h
1
#pragma once
2
3
4
CLASS_DECL_ACME ::i32 random_context_entropy(::i32 iLevel= 3);
5
6
#include <random>
7
//#include "acme/prototype/collection/numeric_array.h"
8
9
10
namespace
mathematics
11
{
12
13
// {
14
// http://www.alhem.net/
25
class
CLASS_DECL_ACME random_number_generator
26
{
27
public
:
28
random_number_generator();
29
30
::u32 m_uSeed;
31
std::default_random_engine m_generator;
32
std::uniform_int_distribution<::u32> m_distributionU32;
33
std::uniform_int_distribution<::u32> m_distributionU8;
34
35
36
void
seed(::i32 iTwistLen, ::u32 seed);
37
::u32 get_u32();
38
::u8 get_unsigned_char();
39
40
private
:
41
::u32 _get();
42
::i32 m_value;
43
u32_array m_uinta;
44
::i64 m_iAccess = 0;
45
};
46
47
// http://www.alhem.net/
52
// }
53
54
55
}
//namespace mathematics
56
57
58
59
prototype
mathematics
random_number_generator.h
Generated by
1.17.0