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

Comparing ray/src/util/radcompare.c (file contents):
Revision 2.33 by greg, Tue Nov 21 19:22:38 2023 UTC vs.
Revision 2.34 by greg, Tue Nov 21 20:01:39 2023 UTC

# Line 245 | Line 245 | color_check(COLOR c1, COLOR c2)
245          return(real_check(colval(c1,p), colval(c2,p)));
246   }
247  
248 + #if 1
249   /* Compare two color spectra for equivalence */
250   static int
251   spec_check(COLORV *sc1, COLORV *sc2)
# Line 261 | Line 262 | spec_check(COLORV *sc1, COLORV *sc2)
262  
263          return(real_check(sc1[p], sc2[p]));
264   }
265 + #else
266 + /* Compare two color spectra for equivalence */
267 + static int
268 + spec_check(COLORV *sc1, COLORV *sc2)
269 + {
270 +        COLOR   c1, c2;
271 +        int     p;
272 +
273 +        if (!real_check(scolor_mean(sc1), scolor_mean(sc2)))
274 +                return(0);
275 +                                        /* do comparisons in RGB space */
276 +        scolor_rgb(c1, sc1);
277 +        scolor_rgb(c2, sc2);
278 +
279 +        p = (colval(c1,GRN) > colval(c1,RED)) ? GRN : RED;
280 +        if (colval(c1,BLU) > colval(c1,p)) p = BLU;
281 +
282 +        return(real_check(colval(c1,p), colval(c2,p)));
283 + }
284 + #endif
285  
286   /* Compare two normal directions for equivalence */
287   static int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines