--- ray/src/rt/ambcomp.c 1991/06/13 13:58:24 1.8 +++ ray/src/rt/ambcomp.c 1991/07/11 16:39:00 1.9 @@ -72,9 +72,9 @@ RAY *r; hlist[1] = dp->t; hlist[2] = dp->p; hlist[3] = 0; - zd = sqrt((dp->t+urand(ilhash(hlist,4)+dp->n))/h->nt); + zd = sqrt((dp->t+urand(urind(ilhash(hlist,4),dp->n)))/h->nt); hlist[3] = 1; - phi = 2.0*PI * (dp->p+urand(ilhash(hlist,4)+dp->n))/h->np; + phi = 2.0*PI * (dp->p+urand(urind(ilhash(hlist,4),dp->n)))/h->np; xd = cos(phi) * zd; yd = sin(phi) * zd; zd = sqrt(1.0 - zd*zd);