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

Comparing ray/src/gen/gensurf.c (file contents):
Revision 1.7 by greg, Wed Mar 7 11:14:36 1990 UTC vs.
Revision 1.8 by greg, Sat May 26 19:44:40 1990 UTC

# Line 219 | Line 219 | register POINT  *row;
219   int  siz;
220   {
221          double  st[2];
222 +        int  end;
223          register int  i;
224 <                                        /* compute one past each end */
224 >        
225 >        if (smooth) {
226 >                i = -1;                 /* compute one past each end */
227 >                end = siz+1;
228 >        } else {
229 >                if (s < -FTINY || s > 1.0+FTINY)
230 >                        return;
231 >                i = 0;
232 >                end = siz;
233 >        }
234          st[0] = s;
235 <        for (i = -1; i <= siz+1; i++) {
235 >        while (i <= end) {
236                  st[1] = (double)i/siz;
237                  row[i].p[0] = funvalue(XNAME, 2, st);
238                  row[i].p[1] = funvalue(YNAME, 2, st);
239                  row[i].p[2] = funvalue(ZNAME, 2, st);
240 +                i++;
241          }
242   }
243  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines