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.1 by greg, Tue Nov 12 16:55:43 1991 UTC vs.
Revision 2.2 by greg, Tue Feb 18 15:25:55 1992 UTC

# Line 128 | Line 128 | register COLR  *scan;
128   register int    len;
129   register int    adjust;
130   {
131 +        int     minexp;
132 +
133 +        if (adjust == 0)
134 +                return;
135 +        minexp = adjust < 0 ? -adjust : 0;
136          while (len-- > 0) {
137 <                scan[0][EXP] += adjust;
137 >                if (scan[0][EXP] <= minexp)
138 >                        scan[0][RED] = scan[0][GRN] = scan[0][BLU] =
139 >                        scan[0][EXP] = 0;
140 >                else
141 >                        scan[0][EXP] += adjust;
142                  scan++;
143          }
144   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines