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.27 by greg, Wed Nov 15 18:02:52 2023 UTC vs.
Revision 2.28 by greg, Fri Nov 17 20:02:07 2023 UTC

# Line 297 | Line 297 | spec_dot(                      /* spectrum dot-product with cumulative ob
297  
298          while (n < ncs) {
299                  int     wl0 = wl1;
300 <                wl1 = (int)(ncs==3 ? wlpt[ncs-1-n] : wlpt[3] + (n+1)*wlstp);
300 >                wl1 = (int)(ncs==3 ? wlpt[2-n] : wlpt[3] + (n+1)*wlstp);
301                  if (wl1 >= wlmax) {
302 <                        sum += (65535 - cumul[wl0-wlmin]) * scol[n];
302 >                        sum += (65535 - cumul[wl0-wlmin]) * scol[ncs-1-n];
303                          break;
304                  }
305 <                sum += (cumul[wl1-wlmin] - cumul[wl0-wlmin]) * scol[n++];
305 >                sum += (cumul[wl1-wlmin] - cumul[wl0-wlmin]) * scol[ncs-1-n++];
306          }
307          return(sum * (1./65535.));
308   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines