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