17 #ifndef __ZEDA_RAND_H__ 18 #define __ZEDA_RAND_H__ 33 #define Z_RAND_MT_HISTORY 623 72 #define zRandInit() zRandInitMT( NULL ) 73 #define zRandI(min,max) zRandMTI( NULL, min, max ) 74 #define zRandF(min,max) zRandMTF( NULL, min, max ) 75 #define zRandN() zRandMTN( NULL ) 76 #define zRandNU() zRandMTNU( NULL ) double zRandMTN(zRandMT *mt)
a pseudo-random double-precision floating-point value in the range of [0,1].
double zRandMTNU(zRandMT *mt)
a pseudo-random value in the range of [0,1).
double nd_last
Definition: zeda_rand.h:43
#define __END_DECLS
Definition: zeda_defs.h:30
void zRandInitMT(zRandMT *mt)
initialize a random number generator based on Mersenne twister.
bool nd_sw
Definition: zeda_rand.h:42
random number generator based on Mersenne twister.
Definition: zeda_rand.h:39
int index
Definition: zeda_rand.h:41
int zRandMTI(zRandMT *mt, int min, int max)
a pseudo-random integer between min and max.
#define __BEGIN_DECLS
Definition: zeda_defs.h:26
unsigned long ulong
Definition: zeda_defs.h:105
#define __EXPORT
Definition: zeda_compat.h:32
zRandMT * zRandMTDefault(void)
return a pointer to the default random number generator.
double zRandMTF(zRandMT *mt, double min, double max)
a pseudo-random double-precision floating-point value between min and max.