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

Comparing ray/src/common/urand.c (file contents):
Revision 1.2 by greg, Fri May 17 13:51:14 1991 UTC vs.
Revision 1.3 by greg, Tue May 21 11:01:00 1991 UTC

# Line 16 | Line 16 | extern char  *malloc();
16  
17   short  *urperm;         /* urand() permutation */
18   int  urmask;            /* bits used in permutation */
19 static int  urorder;    /* number of bits */
19  
20  
21   initurand(size)         /* initialize urand() for size entries */
# Line 49 | Line 48 | int  size;
48  
49  
50   int
51 < urhash(d, n)                    /* hash a set of integer values */
51 > ilhash(d, n)                    /* hash a set of integer values */
52   register int  *d;
53   register int  n;
54   {
# Line 59 | Line 58 | register int  n;
58          hval = 0;
59          while (n-- > 0)
60                  hval += *d++ * tab[n&7];
61 <        return(hval & urmask);
61 >        return(hval);
62   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines