cursetree/cursetree/util.h

12 lines
223 B
C

#ifndef CURSETREE_UTIL_H
#define CURSETREE_UTIL_H
static inline int clampi(int val, int min, int max) {
if (val > max)
return max;
else if (val < min)
return min;
return val;
}
#endif /* CURSETREE_UTIL_H */