projects
/
snark14.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
5eba39c6a3d349c13fa0992e621f0bf63751131b
[snark14.git]
/
src
/
DIGRand
/
DIGRand.cpp
1
2
#include <cstdlib>
3
4
#define USE_RAND48 1
5
6
#include <stdlib.h>
7
#include <DIGRand/DIGRand.h>
8
9
void Srand(unsigned int pSeed)
10
{
11
#if USE_RAND48
12
srand48(pSeed);
13
#else
14
srand(pSeed);
15
#endif
16
}
17
18
double Rand(void)
19
{
20
#if USE_RAND48
21
return drand48();
22
#else
23
return ((double) rand()) / (RAND_MAX + 1.0);
24
#endif
25
}
26