Go to the documentation of this file.
12#ifndef TOR_INTMATH_CMP_H
13#define TOR_INTMATH_CMP_H
22#define MAX(a,b) ( ((a)<(b)) ? (b) : (a) )
25#define MIN(a,b) ( ((a)>(b)) ? (b) : (a) )
34#define CLAMP(min,v,max) \
35 ( ((v) < (min)) ? (min) : \
36 ((v) > (max)) ? (max) : \
40#define ABS(x) ( ((x)<0) ? -(x) : (x) )