-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconverter.c
56 lines (46 loc) · 1.28 KB
/
converter.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* converter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: znichola <znichola@student.42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/28 23:59:52 by znichola #+# #+# */
/* Updated: 2022/12/01 01:43:34 by znichola ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
t_complex ftc(t_fpoint f)
{
t_complex c;
c.a = f.x;
c.b = f.y;
return (c);
}
t_fpoint ctf(t_complex c)
{
t_fpoint f;
f.x = c.a;
f.y = c.b;
return (f);
}
t_ipoint ipoint(int x, int y)
{
t_ipoint i;
i.x = x;
i.y = y;
return (i);
}
t_fpoint fpoint(double x, double y)
{
t_fpoint f;
f.x = x;
f.y = y;
return (f);
}
int toggle(int a)
{
if (a)
return (0);
return (1);
}