diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-02-24 16:14:24 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-02-24 16:14:24 +0100 |
| commit | 1987bca74aec7b8937e6cc69ebf9c584b0467bad (patch) | |
| tree | af79fd5153d9605488f6b0c7a3de988a09994f5e /src/event.c | |
| parent | c6f87a62b31325e91bc8c847de9b20647a9b1cd8 (diff) | |
| download | fractol-1987bca74aec7b8937e6cc69ebf9c584b0467bad.tar.gz fractol-1987bca74aec7b8937e6cc69ebf9c584b0467bad.tar.bz2 fractol-1987bca74aec7b8937e6cc69ebf9c584b0467bad.zip | |
Added tricorn fractal
Diffstat (limited to 'src/event.c')
| -rw-r--r-- | src/event.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/event.c b/src/event.c index 30b5c34..e557435 100644 --- a/src/event.c +++ b/src/event.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/24 09:52:35 by cacharle #+# #+# */ -/* Updated: 2020/02/24 15:38:06 by cacharle ### ########.fr */ +/* Updated: 2020/02/24 16:06:49 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -68,7 +68,7 @@ int event_mouse(int button, int x, int y, t_state *state) int event_mouse_motion(int x, int y, t_state *state) { - if (state->julia_const.r == NAN) + if (state->c.r == NAN) return (0); if (x < 0) x = 0; @@ -78,8 +78,8 @@ int event_mouse_motion(int x, int y, t_state *state) y = 0; if (y > WINDOW_HEIGHT - 1) y = WINDOW_HEIGHT - 1; - state->julia_const.r = ((double)x / (double)WINDOW_WIDTH) * 4.0 - 2.0; - state->julia_const.i = ((double)y / (double)WINDOW_HEIGHT) * 4.0 - 2.0; + state->c.r = ((double)x / (double)WINDOW_WIDTH) * 4.0 - 2.0; + state->c.i = ((double)y / (double)WINDOW_HEIGHT) * 4.0 - 2.0; state->updated = false; return (0); } |
