--- ray/src/common/spec_rgb.c 2007/10/08 18:07:55 2.16 +++ ray/src/common/spec_rgb.c 2009/11/02 23:45:11 2.17 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: spec_rgb.c,v 2.16 2007/10/08 18:07:55 greg Exp $"; +static const char RCSid[] = "$Id: spec_rgb.c,v 2.17 2009/11/02 23:45:11 greg Exp $"; #endif /* * Convert colors and spectral ranges. @@ -244,9 +244,11 @@ RGBPRIMS pr int i; for (i = 0; i < 4; i++) { - if ((pr[i][CIEX] <= CEPS) | (pr[i][CIEY] <= CEPS)) + if ((pr[i][CIEX] <= -CEPS) | (pr[i][CIEY] <= -CEPS)) return(0); - if ((pr[i][CIEX] >= 1.-CEPS) | (pr[i][CIEY] >= 1.-CEPS)) + if ((pr[i][CIEX] >= 1.+CEPS) | (pr[i][CIEY] >= 1.+CEPS)) + return(0); + if (pr[i][CIEX] + pr[i][CIEY] >= 1.+CEPS) return(0); } return(1);