Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Use a #define' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use a #define
Authored by: adriaant on Aug 30, '01 10:12:08PM

I used the following code in my source:

#define drand48() (((float)rand())/((float)RAND_MAX))
#define srand48(x) (srand(x))

MacOSX's rand function works properly. I tested it out and I am content with it.

[ Reply to This | # ]