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.1 by greg, Tue Nov 12 16:54:19 1991 UTC vs.
Revision 2.2 by greg, Mon Sep 21 12:02:27 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   /* SCCSid "$SunId$ LBL" */
4  
# Line 8 | Line 8
8   *     10/1/85
9   */
10  
11 < #ifdef  BSD
11 > #ifdef  MSDOS
12  
13 + #define random          rand
14 +
15 + #define frandom()       (rand()*(1./32768.))
16 +
17 + #else
18 + #ifdef  BSD
19 +
20   extern long  random();
21  
22 < #define  frandom()      (random()*(1./2147483648.))
22 > #define  frandom()      (random()*(1./2147483648.))
23  
24   #else
25  
26   extern long  lrand48();
27   extern double  drand48();
28  
29 < #define  random()       lrand48()
30 < #define  frandom()      drand48()
29 > #define  random()       lrand48()
30 > #define  frandom()      drand48()
31  
32   #endif
33 + #endif
34  
35 < #define  urand(i)       ((urperm[(i)&urmask]+frandom())/(urmask+1))
35 > #define  urand(i)       ((urperm[(i)&urmask]+frandom())/(urmask+1))
36  
37   extern short  *urperm;
38   extern int  urmask;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines