| 477 |
|
/* compute number to check */ |
| 478 |
|
nshadcheck = pow((double)ncnts, shadcert) + .5; |
| 479 |
|
/* modify threshold */ |
| 480 |
< |
if (ncnts > MINSHADCNT) |
| 481 |
< |
ourthresh = shadthresh / r->rweight; |
| 482 |
< |
else |
| 483 |
< |
ourthresh = 0; |
| 480 |
> |
ourthresh = shadthresh / r->rweight; |
| 481 |
|
/* test for shadows */ |
| 482 |
|
for (nhits = 0, hwt = 0.0, sn = 0; sn < ncnts; |
| 483 |
|
hwt += (double)source[scp->sno].nhits / |
| 484 |
|
(double)source[scp->sno].ntests, |
| 485 |
|
sn++) { |
| 486 |
|
/* check threshold */ |
| 487 |
< |
if ((sn+nshadcheck>=ncnts ? cntord[sn].brt : |
| 487 |
> |
if (sn >= MINSHADCNT && |
| 488 |
> |
(sn+nshadcheck>=ncnts ? cntord[sn].brt : |
| 489 |
|
cntord[sn].brt-cntord[sn+nshadcheck].brt) |
| 490 |
< |
< ourthresh*bright(r->rcol)) |
| 490 |
> |
< ourthresh*bright(r->rcol)) |
| 491 |
|
break; |
| 492 |
|
scp = srccnt + cntord[sn].sndx; |
| 493 |
|
/* test for hit */ |