-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
RNG.h
87 lines (60 loc) · 2.43 KB
/
RNG.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright Kabuki Starship� <kabukistarship.com>.
#pragma once
#ifndef SCRIPT2_RNG_DECL
#define SCRIPT2_RNG_DECL
#include <_Config.h>
namespace _ {
/* Gets a random generator device seed. */
LIB_MEMBER IUC RandomSeed();
/* Re-seeds the static mersenne twister engine. */
LIB_MEMBER void RandomizeSeed();
/* Gets a random 8-bit/1-byte unsigned integer. */
LIB_MEMBER IUA Random(IUA min, IUA max);
/* Gets a random 8-bit/1-byte signed integer. */
LIB_MEMBER ISA Random(ISA min, ISA max);
/* Gets a random 16-bit/2-byte unsigned integer. */
LIB_MEMBER IUB Random(IUB min, IUB max);
/* Gets a random 16-bit/2-byte signed integer. */
LIB_MEMBER ISB Random(ISB min, ISB max);
/* Gets a random 32-bit/4-byte unsigned integer. */
LIB_MEMBER IUC Random(IUC min, IUC max);
/* Gets a random 32-bit/4-byte unsigned integer. */
LIB_MEMBER ISC Random(ISC min, ISC max);
/* Gets a random 64-bit/8-byte unsigned integer. */
LIB_MEMBER IUD Random(IUD min, IUD max);
/* Gets a random 64-bit/8-byte signed integer. */
LIB_MEMBER ISD Random(ISD min, ISD max);
/* Gets a random 8-bit/1-IUA unsigned integer. */
LIB_MEMBER IUA RandomUIA();
/* Gets a random 8-bit/1-IUA signed integer. */
LIB_MEMBER ISA RandomSIA();
/* Gets a random 16-bit/2-IUA unsigned integer. */
LIB_MEMBER IUB RandomUI2();
/* Gets a random 16-bit/2-IUA signed integer. */
LIB_MEMBER ISB RandomSIB();
/* Gets a random 32-bit/4-IUA unsigned integer. */
LIB_MEMBER IUC RandomUI4();
/* Gets a random 32-bit/4-IUA signed integer. */
LIB_MEMBER ISC Randomint();
/* Gets a random 64-bit/8-IUA unsigned integer. */
LIB_MEMBER IUD RandomUI8();
/* Gets a random 64-bit/8-IUA signed integer. */
LIB_MEMBER ISD RandomSID();
/* Gets a random 8-bit/1-IUA unsigned integer. */
LIB_MEMBER void RandomNumber(IUA& result);
/* Gets a random 8-bit/1-IUA signed integer. */
LIB_MEMBER void RandomNumber(ISA& result);
/* Gets a random 16-bit/2-IUA unsigned integer. */
LIB_MEMBER void RandomNumber(IUB& result);
/* Gets a random 16-bit/2-IUA signed integer. */
LIB_MEMBER void RandomNumber(ISB& result);
/* Gets a random 32-bit/4-IUA unsigned integer. */
LIB_MEMBER void RandomNumber(IUC& result);
/* Gets a random 32-bit/4-IUA signed integer. */
LIB_MEMBER void RandomNumber(ISC& result);
/* Gets a random 64-bit/8-IUA unsigned integer. */
LIB_MEMBER void RandomNumber(IUD& result);
/* Gets a random 64-bit/8-IUA signed integer. */
LIB_MEMBER void RandomNumber(ISD& result);
} //< namespace _
#endif //< INCLUDED_SCRIPTCRNG