src/aubio_priv.h: add MIN and MAX
authorPaul Brossier <piem@piem.org>
Sat, 12 Sep 2009 12:26:17 +0000 (14:26 +0200)
committerPaul Brossier <piem@piem.org>
Sat, 12 Sep 2009 12:26:17 +0000 (14:26 +0200)
src/aubio_priv.h

index cdb8269..d51f8da 100644 (file)
@@ -168,6 +168,9 @@ typedef enum {
 #define LIN2DB(v) (20.0f*LOG10(v))
 #define SQR(_a)   (_a*_a)
 
+#define MAX(a,b)  ( a > b ? a : b)
+#define MIN(a,b)  ( a < b ? a : b)
+
 #define ELEM_SWAP(a,b) { register smpl_t t=(a);(a)=(b);(b)=t; }
 
 #define ISDENORMAL(f) f < 1.e-37