bglibs
surfrand.h
1 #ifndef BGLIBS__SURFRAND__H__
2 #define BGLIBS__SURFRAND__H__
3 
4 #include "surf.h"
5 
10 struct surfrand
11 {
14  unsigned left;
21 };
22 
23 void surfrand_init(struct surfrand* c, const uint32* data, unsigned words);
24 uint32 surfrand_uint32(struct surfrand* c);
25 double surfrand_double(struct surfrand* c);
26 void surfrand_fill(struct surfrand* c, unsigned char* buf, unsigned len);
27 uint32 surfrand_uniform(struct surfrand* c, uint32 bound);
28 
31 #endif
Definition: surfrand.h:10
double surfrand_double(struct surfrand *c)
Definition: surfrand.c:93
void surfrand_fill(struct surfrand *c, unsigned char *buf, unsigned len)
Definition: surfrand.c:101
uint32 generated[SURF_OUT_U32]
Definition: surfrand.h:16
#define SURF_SEED_U32
Definition: surf.h:14
uint32 counter[SURF_IN_U32]
Definition: surfrand.h:20
unsigned left
Definition: surfrand.h:14
uint32 surfrand_uint32(struct surfrand *c)
Definition: surfrand.c:81
#define SURF_OUT_U32
Definition: surf.h:10
uint32 surfrand_uniform(struct surfrand *c, uint32 bound)
Definition: surfrand.c:121
void surfrand_init(struct surfrand *c, const uint32 *data, unsigned words)
Definition: surfrand.c:51
#define SURF_IN_U32
Definition: surf.h:12
uint32 seed[SURF_SEED_U32]
Definition: surfrand.h:18