diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-04 11:09:50 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-04 11:11:24 +0100 |
| commit | 9bbc949c432f6a981fdac5aec4b36edd2f4dcdba (patch) | |
| tree | b5cf3c8591267d3bc1f9fca800c1a048bd5b6004 /src/fractals/burningship.c | |
| parent | dab9efb7b745fe884fb72017591dce95978c19c4 (diff) | |
| download | fractol-linux.tar.gz fractol-linux.tar.bz2 fractol-linux.zip | |
Linux branch with minilibx_linux(https://framagit.org/ggenois/minilibx_linux)linux
Diffstat (limited to 'src/fractals/burningship.c')
| -rw-r--r-- | src/fractals/burningship.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fractals/burningship.c b/src/fractals/burningship.c index 07baf38..d9e1a9c 100644 --- a/src/fractals/burningship.c +++ b/src/fractals/burningship.c @@ -20,9 +20,10 @@ int burningship(t_state *state, t_complex c) t_complex z; t_complex z_square; double tmp; - + (void)state; - z = c; + z.r = c.r; + z.i = c.i; n = -1; while (++n < state->iterations) { @@ -30,7 +31,7 @@ int burningship(t_state *state, t_complex c) z_square.r = z.r * z.r; if (z_square.r + z_square.i > BURNING_SHIP_ESCAPE_RADIUS_SQUARED) break; - tmp = z_square.r - z_square.i + z.r; + tmp = z_square.r - z_square.i + c.r; z.i = fabs(2.0 * z.r * z.i + c.i); z.r = fabs(tmp); } |
