2015-08-26 03:53:59 +10:00
|
|
|
#ifndef _SWAY_UTIL_H
|
|
|
|
#define _SWAY_UTIL_H
|
|
|
|
|
2015-08-25 23:17:18 +10:00
|
|
|
/**
|
|
|
|
* Wrap i into the range [0, max[
|
|
|
|
*/
|
|
|
|
int wrap(int i, int max);
|
2015-08-26 03:53:59 +10:00
|
|
|
|
2015-12-15 03:07:31 +11:00
|
|
|
/**
|
|
|
|
* Count number of digits in int
|
|
|
|
*/
|
|
|
|
int numlen(int n);
|
|
|
|
|
2015-08-26 03:53:59 +10:00
|
|
|
#endif
|