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

Comparing ray/src/common/data.c (file contents):
Revision 2.1 by greg, Fri Aug 2 18:47:25 2024 UTC vs.
Revision 2.3 by greg, Fri Feb 28 21:07:18 2025 UTC

# Line 343 | Line 343 | getspec(               /* load hyperspectral image as data */
343   #endif
344          if ((pp->arr.s = (uby8 *)malloc(i)) == NULL)
345                  goto memerr;
346 <        for (y = 0; y < ns; y++)                /* read each scanline */
346 >        for (y = ns; y-- > 0; )                 /* read each scanline */
347                  if (freadscolrs(pp->arr.s + y*sl*(si.nc+1), si.nc, sl, fp) < 0)
348                          goto readerr;
349          fclose(fp);
# Line 462 | Line 462 | data_interp(DATARRAY *dp, double *pt, double coef, DAT
462                  c0 = 1./(i-1 - x);
463                  c1 = -2.*c0;
464          } else if (x < i-1) {
465 <                c1 = 1./(i - x);
465 >                c1 = 1./(x - i);
466                  c0 = -2.*c1;
467          } else {
468                  c0 = i+1 - x;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines