72 |
|
hlist[1] = dp->t; |
73 |
|
hlist[2] = dp->p; |
74 |
|
hlist[3] = 0; |
75 |
< |
zd = sqrt((dp->t+urand(ilhash(hlist,4)+dp->n))/h->nt); |
75 |
> |
zd = sqrt((dp->t+urand(urind(ilhash(hlist,4),dp->n)))/h->nt); |
76 |
|
hlist[3] = 1; |
77 |
< |
phi = 2.0*PI * (dp->p+urand(ilhash(hlist,4)+dp->n))/h->np; |
77 |
> |
phi = 2.0*PI * (dp->p+urand(urind(ilhash(hlist,4),dp->n)))/h->np; |
78 |
|
xd = cos(phi) * zd; |
79 |
|
yd = sin(phi) * zd; |
80 |
|
zd = sqrt(1.0 - zd*zd); |
235 |
|
{ |
236 |
|
register int i; |
237 |
|
/* set number of divisions */ |
238 |
< |
hp->nt = sqrt(ambdiv * r->rweight * 0.5) + 0.5; |
239 |
< |
hp->np = 2 * hp->nt; |
238 |
> |
hp->nt = sqrt(ambdiv * r->rweight / PI) + 0.5; |
239 |
> |
hp->np = PI * hp->nt; |
240 |
|
/* make axes */ |
241 |
|
VCOPY(hp->uz, r->ron); |
242 |
|
hp->uy[0] = hp->uy[1] = hp->uy[2] = 0.0; |