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

Comparing ray/src/util/ranimove1.c (file contents):
Revision 3.6 by schorsch, Sun Jul 27 22:12:03 2003 UTC vs.
Revision 3.7 by schorsch, Tue Oct 21 19:19:29 2003 UTC

# Line 186 | Line 186 | sample_wt(xo, yo)              /* compute interpolant sample weigh
186   int     xo, yo;
187   {
188          static double   etab[400];
189 <        int     rad2 = xo*xo + yo*yo;
189 >        /* we can't use the name rad2 here, for some reason Visual C
190 >           thinks that is a constant (compiler bug?) */
191 >        int     rad_2 = xo*xo + yo*yo;
192          int     i;
193  
194          if (etab[0] <= FTINY)           /* initialize exponent table */
# Line 194 | Line 196 | int    xo, yo;
196                          etab[i] = exp(-0.1*i);
197  
198                                          /* look up Gaussian */
199 <        i = (int)((10.*3./(double)SAMPDIST2)*rad2 + .5);
199 >        i = (int)((10.*3./(double)SAMPDIST2)*rad_2 + .5);
200          if (i >= 400)
201                  return(0.0);
202          return(etab[i]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines