dbf-halloween2015
view src/rng.h @ 3:c37fe5d8a4ed
windows port
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 01 Nov 2015 06:04:28 +0200 |
parents | |
children |
line source
1 #ifndef RNG_H_
2 #define RNG_H_
4 #include <stdint.h>
6 struct RandGenState;
8 class RandGen {
9 private:
10 RandGenState *state;
12 RandGen(const RandGen&);
13 RandGen &operator =(const RandGen&);
15 public:
16 RandGen();
17 ~RandGen();
19 void seed(uint32_t s);
21 uint32_t generate();
22 float generate_float();
23 };
25 void rng_srand(uint32_t s);
26 uint32_t rng_rand();
27 float rng_frand();
30 #endif // RNG_H_