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

Comparing ray/src/common/spec_rgb.c (file contents):
Revision 2.19 by greg, Fri Nov 20 17:51:47 2009 UTC vs.
Revision 2.20 by greg, Mon Jan 4 19:40:14 2010 UTC

# Line 241 | Line 241 | colorprimsOK(                  /* are color primaries reasonable? */
241   RGBPRIMS  pr
242   )
243   {
244 <        int     i;
244 >        int     i, j;
245          
246          for (i = 0; i < 4; i++) {
247                  if ((pr[i][CIEX] <= -.5) | (pr[i][CIEY] <= -.5))
# Line 251 | Line 251 | RGBPRIMS  pr
251                  if (pr[i][CIEX] + pr[i][CIEY] >= 1.5)
252                          return(0);
253          }
254 +        for (i = 0; i < 4; i++)
255 +                for (j = i+1; j < 4; j++)
256 +                        if (CEQ(pr[i][CIEX],pr[j][CIEX]) &&
257 +                                        CEQ(pr[i][CIEY],pr[j][CIEY]))
258 +                                return(0);
259          return(1);
260   }
261  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines