This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/ThirdParty/mingwBuild/x64/patches/system/include/rand48.h
2015-08-07 13:21:09 +01:00

19 lines
323 B
C

#ifndef RAND48_H
#define RAND48_H
#define drand48() (rand()*(1./RAND_MAX))
static long _rand = 1;
static __inline__ void srand48(long seed)
{
_rand = seed;
}
static __inline__ long lrand48(void)
{
long val = (int)(abs(10000.0*sin(_rand)));
_rand++;
return val;
}
#endif //RAND48_H