206 |
|
/* check threshold */ |
207 |
|
if (specthresh > FTINY && |
208 |
|
(specthresh >= 1.-FTINY || |
209 |
< |
specthresh > nd.rspec)) |
209 |
> |
specthresh + .05 - .1*frandom() > nd.rspec)) |
210 |
|
nd.specfl |= SP_RBLT; |
211 |
|
/* compute refl. direction */ |
212 |
|
for (i = 0; i < 3; i++) |
225 |
|
/* check threshold */ |
226 |
|
if (specthresh > FTINY && |
227 |
|
(specthresh >= 1.-FTINY || |
228 |
< |
specthresh > nd.tspec)) |
228 |
> |
specthresh + .05 - .1*frandom() > nd.tspec)) |
229 |
|
nd.specfl |= SP_TBLT; |
230 |
|
if (DOT(r->pert,r->pert) <= FTINY*FTINY) { |
231 |
|
VCOPY(nd.prdir, r->rdir); |