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 */ |
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]); |