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.6 by greg, Tue Mar 2 09:09:51 1993 UTC vs.
Revision 2.8 by greg, Sat Mar 26 13:44:38 1994 UTC

# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  <stdio.h>
14  
15 + #include  <math.h>
16 +
17   #include  "color.h"
18  
19   #define  MINELEN        8       /* minimum scanline length for encoding */
20   #define  MAXELEN        0x7fff  /* maximum scanline length for encoding */
21   #define  MINRUN         4       /* minimum run length */
22  
21 #ifndef frexp
22 extern double  frexp();
23 #endif
23  
25
24   char *
25   tempbuffer(len)                 /* get a temporary buffer */
26   unsigned  len;
# Line 243 | Line 241 | double  r, g, b;
241                  return;
242          }
243  
244 <        d = frexp(d, &e) * 256.0 / d;
244 >        d = frexp(d, &e) * 255.9999 / d;
245  
246          clr[RED] = r * d;
247          clr[GRN] = g * d;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines