28 while (str[d.
i] == 32 || (str[d.
i] >= 9 && str[d.
i] <= 13))
30 if (str[d.
i] ==
'-' || str[d.
i] ==
'+')
31 if (str[d.
i++] ==
'-')
33 while (str[d.
i] >=
'0' && str[d.
i] <=
'9')
38 while (str[d.
i] >=
'0' && str[d.
i] <=
'9')
56 while (s1[i] == s2[i] && s1[i])
58 return (s1[i] - s2[i]);
69 if (keydata.key == MLX_KEY_ESCAPE)
70 mlx_close_window(data->
mlx);
71 else if (keydata.key == MLX_KEY_W)
73 else if (keydata.key == MLX_KEY_S)
75 else if (keydata.key == MLX_KEY_A)
77 else if (keydata.key == MLX_KEY_D)
79 else if (keydata.key == MLX_KEY_UP)
81 else if (keydata.key == MLX_KEY_DOWN)
83 if (data->
zoom < 1e-5)
101 if (data->
zoom < 1e-5)
119 count += write(fd, &s[i++], 1);
void render_fractal(t_data *data)
Renders the chosen fractal on the screen.
Helper structure for string-to-double conversion.
Data structure for fractal rendering.
int ft_strcmp(const char *s1, const char *s2)
Compares two strings.
int fr_putstr_fd(char *s, int fd)
Writes a string to a file descriptor and returns.
void handle_key(mlx_key_data_t keydata, void *param)
Handles key inputs.
double ft_atod(const char *str)
Converts a string to a floating-point number.
void handle_scroll(double xdelta, double ydelta, void *param)
Handles mouse scroll input for zooming.