ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/ambcomp.c
(Generate patch)

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 1.13 by greg, Thu Aug 22 11:56:58 1991 UTC vs.
Revision 1.14 by greg, Mon Aug 26 10:11:39 1991 UTC

# Line 237 | Line 237 | double  wt;
237   {
238          register int  i;
239                                          /* set number of divisions */
240 +        if (wt < (.25*PI)/ambdiv+FTINY) {
241 +                hp->nt = hp->np = 0;
242 +                return;                 /* zero samples */
243 +        }
244          hp->nt = sqrt(ambdiv * wt / PI) + 0.5;
245 <        hp->np = PI * hp->nt;
245 >        hp->np = PI * hp->nt + 0.5;
246                                          /* make axes */
247          VCOPY(hp->uz, r->ron);
248          hp->uy[0] = hp->uy[1] = hp->uy[2] = 0.0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines