aboutsummaryrefslogtreecommitdiffhomepage
path: root/midimonster.h
diff options
context:
space:
mode:
Diffstat (limited to 'midimonster.h')
-rw-r--r--midimonster.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/midimonster.h b/midimonster.h
index 572b5fb..8a18155 100644
--- a/midimonster.h
+++ b/midimonster.h
@@ -5,6 +5,7 @@
#include <stdint.h>
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define clamp(val,max,min) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))
#ifdef DEBUG
#define DBGPF(format, ...) fprintf(stderr, (format), __VA_ARGS__)
#define DBG(message) fprintf(stderr, "%s", (message))