-
Notifications
You must be signed in to change notification settings - Fork 0
/
vec2f.c
43 lines (36 loc) · 1.31 KB
/
vec2f.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vec2f.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cyildiri <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/21 21:10:20 by cyildiri #+# #+# */
/* Updated: 2016/11/21 21:14:00 by cyildiri ### ########.fr */
/* */
/* ************************************************************************** */
#include "libgraphics.h"
t_vec2fc *new_vec2f(float x, float y)
{
t_vec2fc *point;
if (!(point = (t_vec2fc *)ft_memalloc(sizeof(t_vec2fc))))
return (NULL);
point->x = x;
point->y = y;
return (point);
}
t_vec2fc vec2f(float x, float y)
{
t_vec2fc point;
point.x = x;
point.y = y;
return (point);
}
t_vec2fc vec2fc(float x, float y, int color)
{
t_vec2fc point;
point.x = x;
point.y = y;
point.color = color;
return (point);
}