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.1 by greg, Fri May 17 12:55:27 1991 UTC vs.
Revision 1.4 by greg, Fri Jun 7 10:47:17 1991 UTC

# Line 45 | Line 45 | int  size;
45                                  urperm[i+offset]++;
46                  }
47   }
48 +
49 +
50 + int
51 + ilhash(d, n)                    /* hash a set of integer values */
52 + register int  *d;
53 + register int  n;
54 + {
55 +        static int  tab[8] = {13623,353,1637,5831,2314,3887,5832,8737};
56 +        register int  hval;
57 +
58 +        hval = 0;
59 +        while (n-- > 0)
60 +                hval += *d++ * tab[n&7];
61 +        return(hval);
62 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines