# | 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 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |