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

Comparing ray/src/common/color.c (file contents):
Revision 2.10 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.11 by greg, Mon Apr 7 15:43:08 2003 UTC

# Line 253 | Line 253 | double  r, g, b;
253  
254          d = frexp(d, &e) * 255.9999 / d;
255  
256 <        clr[RED] = r * d;
257 <        clr[GRN] = g * d;
258 <        clr[BLU] = b * d;
256 >        if (r > 0.0)
257 >                clr[RED] = r * d;
258 >        else
259 >                clr[RED] = 0;
260 >        if (g > 0.0)
261 >                clr[GRN] = g * d;
262 >        else
263 >                clr[GRN] = 0;
264 >        if (b > 0.0)
265 >                clr[BLU] = b * d;
266 >        else
267 >                clr[BLU] = 0;
268 >
269          clr[EXP] = e + COLXS;
270   }
271  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines