319 |
|
col[BLU] = (clr[BLU] + 0.5)*f; |
320 |
|
} |
321 |
|
} |
322 |
– |
|
323 |
– |
|
324 |
– |
#ifdef FREXP |
325 |
– |
double |
326 |
– |
frexp(x, ip) /* call it paranoia, I've seen the lib version */ |
327 |
– |
register double x; |
328 |
– |
int *ip; |
329 |
– |
{ |
330 |
– |
int neg; |
331 |
– |
register int i; |
332 |
– |
|
333 |
– |
if (neg = (x < 0.0)) |
334 |
– |
x = -x; |
335 |
– |
else if (x == 0.0) { |
336 |
– |
*ip = 0; |
337 |
– |
return(0.0); |
338 |
– |
} |
339 |
– |
if (x < 0.5) |
340 |
– |
for (i = 0; x < 0.5; i--) |
341 |
– |
x *= 2.0; |
342 |
– |
else |
343 |
– |
for (i = 0; x >= 1.0; i++) |
344 |
– |
x /= 2.0; |
345 |
– |
*ip = i; |
346 |
– |
if (neg) |
347 |
– |
return(-x); |
348 |
– |
else |
349 |
– |
return(x); |
350 |
– |
} |
351 |
– |
#endif |