# | Line 19 | Line 19 | |
---|---|---|
19 | ||
20 | #ifdef MSDOS | |
21 | ||
22 | + | #if (RAND_MAX <= 65536) |
23 | #define random() ((long)rand()<<16^(long)rand()<<6^(long)rand()>>4) | |
24 | + | #else |
25 | + | #define random() rand() |
26 | + | #endif |
27 | #define srandom(s) srand((unsigned)(s)) | |
28 | ||
29 | < | #define frandom() (rand()*(1./32768.)) |
29 | > | #define frandom() (rand()*(1./RAND_MAX)) |
30 | ||
31 | #else | |
32 | #ifdef BSD |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |