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.5 by gregl, Mon Dec 1 09:55:00 1997 UTC vs.
Revision 2.7 by gwlarson, Sat Jan 9 09:15:48 1999 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1997 Silicon Graphics, Inc. */
1 > /* Copyright (c) 1999 Silicon Graphics, Inc. */
2  
3   /* SCCSid "$SunId$ SGI" */
4  
# Line 11 | Line 11
11   #ifdef  MSDOS
12  
13   #define random()        ((long)rand()<<16^(long)rand()<<6^(long)rand()>>4)
14 + #define srandom(s)      srand((unsigned)(s))
15  
16   #define frandom()       (rand()*(1./32768.))
17  
# Line 27 | Line 28 | extern long  lrand48();
28   extern double  drand48();
29  
30   #define  random()       lrand48()
31 + #define  srandom(s)     srand48((long)(s))
32   #define  frandom()      drand48()
33  
34   #endif
# Line 39 | Line 41 | extern double  drand48();
41  
42   #else
43  
44 < extern short    *urperm;
44 > extern unsigned short   *urperm;
45   extern int      urmask, initurand();
46  
47   #define  urand(i)       ((urperm[(i)&urmask]+frandom())/(urmask+1))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines