-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_set_fractal.c
29 lines (27 loc) · 1.21 KB
/
ft_set_fractal.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_set_fractal.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vcastilh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/18 18:57:23 by vcastilh #+# #+# */
/* Updated: 2022/02/21 10:56:04 by vcastilh ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
void ft_set_fractal(char **argv, t_fractal *fractal)
{
fractal->max = ft_complex(2, 2);
fractal->min = ft_complex(-2, -2);
if (argv[1][0] == 'M')
{
fractal->name = argv[1];
}
else if (argv[1][0] == 'J')
{
fractal->name = argv[1];
fractal->c.re = ft_atold(argv[2]);
fractal->c.im = ft_atold(argv[3]);
}
}