aboutsummaryrefslogtreecommitdiff
path: root/src/lib/intmath/cmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/intmath/cmp.h')
-rw-r--r--src/lib/intmath/cmp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/intmath/cmp.h b/src/lib/intmath/cmp.h
index d0b0e8b954..67a738861b 100644
--- a/src/lib/intmath/cmp.h
+++ b/src/lib/intmath/cmp.h
@@ -36,4 +36,7 @@
((v) > (max)) ? (max) : \
(v) )
+/** Give the absolute value of <b>x</b>, independent of its type. */
+#define ABS(x) ( ((x)<0) ? -(x) : (x) )
+
#endif /* !defined(TOR_INTMATH_CMP_H) */