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

20 lines
347 B
C
Raw Normal View History

2015-08-04 12:39:06 +00:00
#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