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

Comparing ray/src/rt/data.c (file contents):
Revision 2.8 by greg, Thu Apr 14 04:50:27 1994 UTC vs.
Revision 2.9 by greg, Fri May 13 13:05:13 1994 UTC

# Line 341 | Line 341 | double *pt;
341          int  asize;
342          int  lower, upper;
343          register int  i;
344 <        double  x, y, y0, y1;
344 >        double  x, y0, y1;
345                                          /* set up dimensions for recursion */
346          sd.nd = dp->nd - 1;
347          asize = 1;
# Line 354 | Line 354 | double *pt;
354                                          /* get independent variable */
355          if (dp->dim[0].p == NULL) {             /* evenly spaced points */
356                  x = (pt[0] - dp->dim[0].org)/dp->dim[0].siz;
357 <                x = x * (dp->dim[0].ne - 1);
357 >                x *= (double)(dp->dim[0].ne - 1);
358                  i = x;
359                  if (i < 0)
360                          i = 0;
# Line 395 | Line 395 | double *pt;
395           * taper off harmonically to zero.
396           */
397          if (x > i+2)
398 <                y = (2*y1-y0)/(x-i-1);
399 <        else if (x < i-1)
400 <                y = (2*y0-y1)/(i-x);
401 <        else
402 <                y = y0*((i+1)-x) + y1*(x-i);
398 >                return( (2*y1-y0)/(x-(i-1)) );
399  
400 <        return(y);
400 >        if (x < i-1)
401 >                return( (2*y0-y1)/(i-x) );
402 >
403 >        return( y0*((i+1)-x) + y1*(x-i) );
404   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines