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

Comparing ray/src/px/pcond4.c (file contents):
Revision 3.6 by greg, Sat Oct 5 08:05:27 1996 UTC vs.
Revision 3.7 by greg, Sat Oct 5 11:17:10 1996 UTC

# Line 126 | Line 126 | int    y;
126          register int    x, i;
127  
128          vy = dy = (y+.5)/numscans(&inpres)*fvyr - .5;
129 <        if (vy >= fvyr-1) vy--;
129 >        while (vy >= fvyr-1) vy--;
130          dy -= (double)vy;
131          for (x = 0; x < scanlen(&inpres); x++) {
132                  vx = dx = (x+.5)/scanlen(&inpres)*fvxr - .5;
133 <                if (vx >= fvxr-1) vx--;
133 >                while (vx >= fvxr-1) vx--;
134                  dx -= (double)vx;
135                  for (i = 0; i < 3; i++) {
136                          lv = (1.-dy)*colval(veilscan(vy)[vx],i) +
# Line 297 | Line 297 | SCANBAR        *sb;
297          }
298                                          /* compute coordinates for sb */
299          ix = dx = (x+.5)/sb->sampr - .5;
300 <        if (ix >= sb->len-1) ix--;
300 >        while (ix >= sb->len-1) ix--;
301          dx -= (double)ix;
302          iy = dy = (y+.5)/sb->sampr - .5;
303 <        if (iy >= numscans(&inpres)/sb->sampr-1) iy--;
303 >        while (iy >= numscans(&inpres)/sb->sampr-1) iy--;
304          dy -= (double)iy;
305                                          /* get scanlines */
306          sl0 = getascan(sb, iy);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines