1 |
< |
/* Copyright (c) 1992 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
4 |
> |
static char SCCSid[] = "$SunId$ SGI"; |
5 |
|
#endif |
6 |
|
|
7 |
|
/* |
60 |
|
/* compute gamb -> colr mapping */ |
61 |
|
i = 0; |
62 |
|
mult = 256.0; |
63 |
< |
for (j = 255; j > 0; j--) { |
64 |
< |
while ((g_mant[j] = mult * (*f)(j/256.0, a2)) < 128) { |
63 |
> |
for (j = 256; j--; ) { |
64 |
> |
while ((g_mant[j] = mult * (*f)((j+.5)/256.0, a2)) < 128) { |
65 |
|
i++; |
66 |
|
mult *= 2.0; |
67 |
|
} |
68 |
|
g_nexp[j] = i; |
69 |
|
} |
70 |
– |
g_mant[0] = 0; |
71 |
– |
g_nexp[0] = COLXS; |
70 |
|
return(0); |
71 |
|
} |
72 |
|
|