aboutsummaryrefslogtreecommitdiff
path: root/include/util.h
blob: 9cb861dd98badd420e43301d0519bb6c0ee6950a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef _SWAY_UTIL_H
#define _SWAY_UTIL_H

/**
 * Wrap i into the range [0, max[
 */
int wrap(int i, int max);

/**
 * Count number of digits in int
 */
int numlen(int n);

#endif