--- ray/src/common/color.c 1993/03/02 09:09:51 2.6 +++ ray/src/common/color.c 1994/03/26 13:44:38 2.8 @@ -12,17 +12,15 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#include + #include "color.h" #define MINELEN 8 /* minimum scanline length for encoding */ #define MAXELEN 0x7fff /* maximum scanline length for encoding */ #define MINRUN 4 /* minimum run length */ -#ifndef frexp -extern double frexp(); -#endif - char * tempbuffer(len) /* get a temporary buffer */ unsigned len; @@ -243,7 +241,7 @@ double r, g, b; return; } - d = frexp(d, &e) * 256.0 / d; + d = frexp(d, &e) * 255.9999 / d; clr[RED] = r * d; clr[GRN] = g * d;