Bugzilla bug 117479: add the PR_ABS macro. Thanks to Roland Mainz

<Roland.Mainz@informatik.med.uni-giessen.de> for the patch.
This commit is contained in:
wtc%netscape.com 2002-02-03 04:34:50 +00:00
parent f22517332a
commit 5329f4271c

View File

@ -239,13 +239,15 @@
/***********************************************************************
** MACROS: PR_ROUNDUP
** PR_MIN
** PR_MAX
** PR_MAX
** PR_ABS
** DESCRIPTION:
** Commonly used macros for operations on compatible types.
***********************************************************************/
#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y))
#define PR_MIN(x,y) ((x)<(y)?(x):(y))
#define PR_MAX(x,y) ((x)>(y)?(x):(y))
#define PR_ABS(x) ((x)<0?-(x):(x))
PR_BEGIN_EXTERN_C