diff options
author | camthesaxman <cameronghall@cox.net> | 2017-11-26 02:01:36 -0600 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2017-11-26 02:01:36 -0600 |
commit | d373f41c2cbd2dc71ca2287b179c7c8777b9eb02 (patch) | |
tree | 9f39e33187265d606236e2d7a7cb2ddb2009b575 /include/random.h | |
parent | 20c5936f0c9fd15d34fce0409e8835282ea2fcaf (diff) |
rename rng.c to random.c
Diffstat (limited to 'include/random.h')
-rw-r--r-- | include/random.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/random.h b/include/random.h new file mode 100644 index 000000000..a928a97b5 --- /dev/null +++ b/include/random.h @@ -0,0 +1,16 @@ +#ifndef GUARD_RANDOM_H +#define GUARD_RANDOM_H + +extern u32 gRngValue; + +//Returns a 16-bit pseudorandom number +u16 Random(void); + +//Returns a 32-bit pseudorandom number +#define Random32() (Random() | (Random() << 16)) + +//Sets the initial seed value of the pseudorandom number generator +void SeedRng(u16 seed); + +#endif // GUARD_RANDOM_H + |