-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmallest_map.c
More file actions
26 lines (25 loc) · 1.17 KB
/
smallest_map.c
File metadata and controls
26 lines (25 loc) · 1.17 KB
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
/* ************************************************************************** */
/* */
/* :::::::: */
/* smallest_map.c :+: :+: */
/* +:+ */
/* By: aholster <aholster@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2019/03/15 16:26:43 by lgutter #+# #+# */
/* Updated: 2019/04/01 15:49:33 by aholster ######## odam.nl */
/* */
/* ************************************************************************** */
unsigned short smallest_map(short tetcount)
{
if (tetcount < 13)
{
if (tetcount < 5)
return ((tetcount < 4) ? tetcount + 1 : 4);
if (tetcount < 7)
return (5);
return ((tetcount < 10) ? 6 : 7);
}
if (tetcount < 21)
return ((tetcount < 17) ? 8 : 9);
return ((tetcount < 26) ? 10 : 11);
}