-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_control_height.c
38 lines (35 loc) · 1.35 KB
/
ft_control_height.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_control_height.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: itoth <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/18 18:57:57 by itoth #+# #+# */
/* Updated: 2017/03/18 18:57:58 by itoth ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
void ft_control_height(t_env *m, int control)
{
int i;
int j;
i = 0;
while (i < m->rows)
{
j = 0;
while (j < m->columns)
{
if (m->map2[i][j].z != 0 && control == 1)
m->map2[i][j].z *= 2;
if (m->map2[i][j].z != 0 && control == -1)
m->map2[i][j].z /= 2;
if (m->map3[i][j].z != 0 && control == 1)
m->map3[i][j].z *= 2;
if (m->map3[i][j].z != 0 && control == -1)
m->map3[i][j].z /= 2;
j++;
}
i++;
}
}