-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_init.c
26 lines (23 loc) · 1.1 KB
/
data_init.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* data_init.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmoumni <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/22 14:35:24 by mmoumni #+# #+# */
/* Updated: 2022/01/02 17:10:39 by mmoumni ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
t_point *point_init(int x, int y, t_fdf *fdf)
{
t_point *p;
p = (t_point *)malloc(sizeof(t_point));
if (!p)
return (NULL);
p->x = x;
p->y = y;
p->z = fdf->matrix[y][x].z.altitude * fdf->altitude;
return (p);
}