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 1.2 by greg, Tue Sep 26 08:28:53 1989 UTC vs.
Revision 2.1 by greg, Tue Nov 12 16:54:19 1991 UTC

# Line 3 | Line 3
3   /* SCCSid "$SunId$ LBL" */
4  
5   /*
6 < *  random.h - header file for random(3) function.
6 > *  random.h - header file for random(3) and urand() function.
7   *
8   *     10/1/85
9   */
10  
11 + #ifdef  BSD
12 +
13   extern long  random();
14  
15   #define  frandom()      (random()*(1./2147483648.))
16 +
17 + #else
18 +
19 + extern long  lrand48();
20 + extern double  drand48();
21 +
22 + #define  random()       lrand48()
23 + #define  frandom()      drand48()
24 +
25 + #endif
26 +
27 + #define  urand(i)       ((urperm[(i)&urmask]+frandom())/(urmask+1))
28 +
29 + extern short  *urperm;
30 + extern int  urmask;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines