]> Pileus Git - lackey/blobdiff - src/util.h
Move drawing code to screen.c, work on day view
[lackey] / src / util.h
index 98fb33285a8b40c242703b93843c5e3d52329c93..b40f8b3e5a47cabeb5d4058fef40b9788d3119be 100644 (file)
@@ -18,6 +18,7 @@
 /* Macros */
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define CLAMP(x,l,h) MIN(MAX(x,l),h)
 #define ROUND(x) ((int)((x)+0.5))
 #define N_ELEMENTS(x) (sizeof(x)/sizeof((x)[0]))