-
Notifications
You must be signed in to change notification settings - Fork 0
/
controls_iso.c
30 lines (26 loc) · 1.22 KB
/
controls_iso.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* controls_iso.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mhasan <mhasan@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/05 18:09:34 by mhasan #+# #+# */
/* Updated: 2020/02/13 20:58:29 by mhasan ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
void isometric(int *x, int *y, int z)
{
int previous_x;
int previous_y;
previous_x = *x;
previous_y = *y;
*x = (previous_x - previous_y) * cos(0.523599);
*y = -z + (previous_x + previous_y) * sin(0.523599);
}
void projection(t_draw *info)
{
isometric(&info->x, &info->y, info->z);
isometric(&info->x2, &info->y2, info->z2);
}