166 |
|
static double x[3]; |
167 |
|
static double f[4]; |
168 |
|
|
169 |
< |
if (gotV && x[0]==xnew[0] && (x[1]==xnew[1]) & (x[2]==xnew[2])) { |
170 |
< |
if (!(gotV>>i & 1)) { |
171 |
< |
f[i] = noise3partial(f[3], x, i); |
172 |
< |
gotV |= 1<<i; |
173 |
< |
} |
174 |
< |
return(f[i]); |
169 |
> |
if (!gotV || xnew[0] != x[0] || (xnew[1] != x[1]) | (xnew[2] != x[2])) { |
170 |
> |
f[3] = perlin_noise(x[0]=xnew[0], x[1]=xnew[1], x[2]=xnew[2]); |
171 |
> |
gotV = 0x8; |
172 |
|
} |
173 |
< |
gotV = 0x8; |
174 |
< |
return(f[3] = perlin_noise(x[0]=xnew[0], x[1]=xnew[1], x[2]=xnew[2])); |
173 |
> |
if (!(gotV>>i & 1)) { |
174 |
> |
f[i] = noise3partial(f[3], x, i); |
175 |
> |
gotV |= 1<<i; |
176 |
> |
} |
177 |
> |
return(f[i]); |
178 |
|
} |
179 |
|
|
180 |
|
static double |