[svn-r176] added ABS macro

This commit is contained in:
Quincey Koziol 1998-01-27 19:20:01 -05:00
parent e1b3f3e3b3
commit bae13084f0

View File

@ -80,6 +80,11 @@
# define MAX(a,b) (((a)>(b)) ? (a) : (b))
#endif
/* absolute value */
#ifndef ABS
# define ABS(a) (((a)>=0) ? (a) : -(a))
#endif
/* maximum of three values */
#ifndef MAX3
# define MAX3(a,b,c) MAX(MAX(a,b),c)