-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvec2i.c
33 lines (28 loc) · 1.16 KB
/
vec2i.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vec2i.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cyildiri <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/21 21:01:16 by cyildiri #+# #+# */
/* Updated: 2016/11/21 21:10:58 by cyildiri ### ########.fr */
/* */
/* ************************************************************************** */
#include "libgraphics.h"
t_vec2i *new_vec2i(int x, int y)
{
t_vec2i *point;
if (!(point = (t_vec2i *)ft_memalloc(sizeof(t_vec2i))))
return (NULL);
point->x = x;
point->y = y;
return (point);
}
t_vec2i vec2i(int x, int y)
{
t_vec2i point;
point.x = x;
point.y = y;
return (point);
}