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

Comparing ray/src/px/macbethcal.c (file contents):
Revision 2.4 by greg, Wed Oct 11 20:48:17 1995 UTC vs.
Revision 2.5 by greg, Tue Oct 17 10:24:21 1995 UTC

# Line 272 | Line 272 | COLOR  y, x;
272          register int    i, n;
273  
274          for (i = 0; i < 3; i++) {
275 <                n = NMBNEU;
276 <                while (n > 0 && colval(x,i) < colval(bramp[--n][0],i))
277 <                        ;
275 >                for (n = 0; n < NMBNEU-2; n++)
276 >                        if (colval(x,i) < colval(bramp[n+1][0],i))
277 >                                break;
278                  cv[i] = ((colval(bramp[n+1][0],i) - colval(x,i)) *
279                                                  colval(bramp[n][1],i) +
280                                  (colval(x,i) - colval(bramp[n][0],i)) *
# Line 452 | Line 452 | putdebug()                     /* put out debugging picture */
452                  exit(1);
453          }
454                                                  /* finish debug header */
455 +        fputformat(COLRFMT, debugfp);
456          putc('\n', debugfp);
457          fprtresolu(xmax, ymax, debugfp);
458          for (y = ymax-1; y >= 0; y--) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines