surfrand.h
#ifndef BGLIBS__SURFRAND__H__
#define BGLIBS__SURFRAND__H__
#include "surf.h"
struct surfrand
{
unsigned left;
uint32 generated[SURF_OUT_U32];
uint32 seed[SURF_SEED_U32];
uint32 counter[SURF_IN_U32];
};
void surfrand_init(struct surfrand* c, const uint32* data, unsigned words);
uint32 surfrand_uint32(struct surfrand* c);
double surfrand_double(struct surfrand* c);
void surfrand_fill(struct surfrand* c, unsigned char* buf, unsigned len);
uint32 surfrand_uniform(struct surfrand* c, uint32 bound);
#endif
SURF_OUT_U32
#define SURF_OUT_U32
Definition surf.h:10
SURF_IN_U32
#define SURF_IN_U32
Definition surf.h:12
SURF_SEED_U32
#define SURF_SEED_U32
Definition surf.h:14
surfrand_uint32
uint32 surfrand_uint32(struct surfrand *c)
Definition surfrand.c:81
surfrand_init
void surfrand_init(struct surfrand *c, const uint32 *data, unsigned words)
Definition surfrand.c:51
surfrand_fill
void surfrand_fill(struct surfrand *c, unsigned char *buf, unsigned len)
Definition surfrand.c:101
surfrand_uniform
uint32 surfrand_uniform(struct surfrand *c, uint32 bound)
Definition surfrand.c:121
surfrand_double
double surfrand_double(struct surfrand *c)
Definition surfrand.c:93
surfrand
Definition surfrand.h:11
surfrand::seed
uint32 seed[SURF_SEED_U32]
Definition surfrand.h:18
surfrand::counter
uint32 counter[SURF_IN_U32]
Definition surfrand.h:20
surfrand::generated
uint32 generated[SURF_OUT_U32]
Definition surfrand.h:16
surfrand::left
unsigned left
Definition surfrand.h:14