diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -22,6 +22,7 @@ #define SGN(x) ((x) >= 0.0 ? 1.0 : -1.0) #define MAX(x, y) ((x) > (y) ? (x) : (y)) #define MIN(x, y) ((x) > (y) ? (y) : (x)) +#define CLIP(val, min, max) (MIN(MAX(val, min), max)) #define ARRAY_ELEMS(arr) (sizeof(arr) / sizeof(*arr)) #include <stdio.h> |