summaryrefslogtreecommitdiff
path: root/utils.c
blob: e3f79f930e72fa34c644f38932888514907f2fd9 (plain)
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
#include <stddef.h> // for int
#include <math.h> // for floorf()
#include "utils.h"

int
min_int(int a, int b)
{
	return (a < b) ? a : b;
}
size_t
min_size_t(size_t a, size_t b)
{
	return (a < b) ? a : b;
}

int
max_int(int a, int b)
{
	return (a > b) ? a : b;
}
size_t
max_size_t(size_t a, size_t b)
{
	return (a > b) ? a : b;
}