ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/colrops.c
(Generate patch)

Comparing ray/src/common/colrops.c (file contents):
Revision 2.4 by greg, Fri Oct 2 16:00:51 1992 UTC vs.
Revision 2.5 by gregl, Wed Jan 21 12:55:00 1998 UTC

# Line 1 | Line 1
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   /*
# Line 60 | Line 60 | double a2;
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines