mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
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:
parent
f22517332a
commit
5329f4271c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user