-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextra.c
38 lines (32 loc) · 1.16 KB
/
extra.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
/* ************************************************************************** */
/* */
/* :::::::: */
/* extra.c :+: :+: */
/* +:+ */
/* By: asulliva <[email protected]> +#+ */
/* +#+ */
/* Created: 2019/04/29 15:06:00 by asulliva #+# #+# */
/* Updated: 2019/05/09 19:03:40 by asulliva ######## odam.nl */
/* */
/* ************************************************************************** */
#include "fdf.h"
int abs(int n)
{
return ((n > 0) ? n : (n * (-1)));
}
int win_width(t_mlx *map)
{
int w;
w = map->size_x * 30 + 150;
if (w > 2500)
w = 2500;
return (w);
}
int win_height(t_mlx *map)
{
int h;
h = map->size_y * 30 + 150;
if (h > 1500)
h = 1500;
return (h);
}