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.7 by gwlarson, Sat Jan 9 09:15:48 1999 UTC vs.
Revision 2.9 by greg, Tue Feb 25 02:47:21 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1999 Silicon Graphics, Inc. */
2 <
3 < /* SCCSid "$SunId$ SGI" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   *  random.h - header file for random(3) and urand() function.
7 *
8 *     10/1/85
4   */
5  
6 + #include "copyright.h"
7 +
8 + #ifdef  NORANDOM
9 +
10 + #undef  random
11 + #define  random()       1073741820
12 + #undef  srandom
13 + #define  srandom(s)     (s)
14 + #define  frandom()      0.5
15 + #define  urand(i)       0.5
16 + #define  initurand(n)   (n)
17 +
18 + #else
19 +
20   #ifdef  MSDOS
21  
22   #define random()        ((long)rand()<<16^(long)rand()<<6^(long)rand()>>4)
# Line 42 | Line 51 | extern double  drand48();
51   #else
52  
53   extern unsigned short   *urperm;
54 < extern int      urmask, initurand();
54 > extern int      urmask;
55  
56   #define  urand(i)       ((urperm[(i)&urmask]+frandom())/(urmask+1))
57 +
58 + #endif
59 +
60 + #endif
61 +
62 + #ifdef NOPROTO
63 +
64 + extern int      initurand();
65 + extern int      ilhash();
66 + extern int      urind();
67 + extern void     multisamp();
68 +
69 + #else
70 +                                /* defined in urand.c */
71 + extern int      initurand(int size);
72 + extern int      ilhash(int *d, int n);
73 +                                /* defined in urind.c */
74 + extern int      urind(int s, int i);
75 +                                /* defined in multisamp.c */
76 + extern void     multisamp(double t[], int n, double r);
77  
78   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines