38 double RandReal(
double low,
double max);
42 static int ourInitialized;
48 int RandGen::ourInitialized = 0;
54 if (0 == ourInitialized)
65 if (0 == ourInitialized)
67 srand(
unsigned(time(0)));
82 return low +
RandInt(max-low+1);
88 return rand() / (double(RAND_MAX) + 1);
93 double width = fabs(high-low);
94 double thelow = low < high ? low : high;
static void SetSeed(int seed)
int RandInt(int max=INT_MAX)