18 #include "../Util/Random.h" 32 fut_initRanG = seedValA;
54 #define NDIV (1+(IM-1)/NTAB) 56 #define RNMX (1.0-EPS) 64 if (fut_initRanG <= 0 || !iy) {
65 if (-(fut_initRanG) < 1) fut_initRanG=1;
66 else fut_initRanG = -(fut_initRanG);
67 for (j=NTAB+7;j>=0;j--) {
69 fut_initRanG=IA*(fut_initRanG-k*IQ)-IR*k;
70 if (fut_initRanG < 0) fut_initRanG += IM;
71 if (j < NTAB) iv[j] = fut_initRanG;
76 fut_initRanG=IA*(fut_initRanG-k*IQ)-IR*k;
77 if (fut_initRanG < 0) fut_initRanG += IM;
81 if ((temp=AM*iy) > RNMX)
return RNMX;
106 static int isetL = 0;
108 double facL, rsqL, v1L, v2L;
116 rsqL = v1L * v1L + v2L * v2L;
118 while( rsqL >= 1.0 || rsqL == 0.0 );
119 facL = sqrt( -2.0 * log( rsqL ) / rsqL );
void srand48(long seedval)
void util_seedRandom(long seedValA)
double util_gaussRandom()