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

Comparing ray/src/common/image.c (file contents):
Revision 2.36 by greg, Wed Mar 2 17:24:55 2011 UTC vs.
Revision 2.37 by greg, Sat Oct 27 03:01:21 2012 UTC

# Line 354 | Line 354 | double  ly
354   {
355          int  x, y;
356  
357 <        x = (lx >= 0.0) ? (int)(lx * rp->xr) : -(int)(-lx * rp->xr);
358 <        y = (ly >= 0.0) ? (int)(ly * rp->yr) : -(int)(-ly * rp->yr);
357 >        x = (int)(lx*rp->xr + .5 - (lx < 0.0));
358 >        y = (int)(ly*rp->yr + .5 - (ly < 0.0));
359 >
360          if (rp->rt & XDECR)
361                  x = rp->xr-1 - x;
362          if (rp->rt & YDECR)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines