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

Comparing ray/src/common/tmap16bit.c (file contents):
Revision 1.8 by greg, Thu May 15 22:15:16 2008 UTC vs.
Revision 1.9 by greg, Mon Mar 7 20:49:19 2011 UTC

# Line 235 | Line 235 | tmCvRGB48(TMstruct *tms, TMbright *ls, BYTE *cs,
235                                                  ((1L<<LOGTABBITS)-1) ];
236                          d -= M_LN2*(gv*nshft + nshft2);
237                          d = (double)TM_BRTSCALE*(d + log_inpsf);
238 <                        bi = (int)(d>0. ? d+.5 : d-.5);
238 >                        bi = (int)(d + .5 - (d < 0.));
239                  }
240                                                          /* world luminance */
241                  ls[i] = bi;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines