[Fix] Slight plasma fractal issue.
This commit is contained in:
parent
5c75686736
commit
0815682bfc
@ -45,6 +45,10 @@ static double* pf_genFractalMap(const int w, const int h, double rug) {
|
||||
double cx, cy;
|
||||
|
||||
map = malloc(w*h * sizeof(double));
|
||||
if(map == NULL) {
|
||||
WARN("Out of memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Set up initial values.
|
||||
cx = (double)w/2;
|
||||
@ -93,7 +97,6 @@ static void pf_divFractal(double* map, const double x, const double y,
|
||||
pf_divFractal(map, x, y+nh, nw, nh, rw, rh, e4, m, e3, c4, rug);
|
||||
} else
|
||||
// Actually write the pixel.
|
||||
//map[y*rw+x] = (c1 + c2 + c3 + c4)/4.;
|
||||
map[(int)round(y)*(int)rw+(int)round(x)] = (c1 + c2 + c3 + c4)/4.;
|
||||
map[(int)y*(int)rw + (int)x] = (c1 + c2 + c3 + c4)/4.;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user