ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/random.h
(Generate patch)

Comparing ray/src/common/random.h (file contents):
Revision 2.9 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.10 by greg, Thu Mar 27 16:33:38 2003 UTC

# 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines