3 ms·
I wish the source code was cross-platform. It doesn't build in Visual Studio. 'erand48': identifier not found 'M_PI' : undeclared identifier Obviously #d
by palish 17y ago
I wish the source code was cross-platform. It doesn't build in Visual Studio.
'erand48': identifier not found
'M_PI' : undeclared identifier
Obviously #define M_PI 3.1415926 should do the trick, but I need to track down an erand48 replacement.
- romland 17y agoMight want to check out: http://gnuwin32.sourceforge.net/packages/libgw32c.htm http://gnuwin32.sourceforge.net/packages/libgw32c.htm Or the FreeBSD source: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/erand48.c?rev=1.2 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/erand...
- jey 17y agoerand48 returns random doubles from [0.0, 1.0). The argument to erand48() is just a state vector (instead of the usual unsafe convention of having the RNG store its state internally). You can replace it with a call to any other equivalent random number generator. http://www.opengroup.org/onlinepubs/000095399/functions/erand48.html http://www.opengroup.org/onlinepubs/000095399/functions/eran...