diff options
Diffstat (limited to 'ext/standard/php_math.h')
-rw-r--r-- | ext/standard/php_math.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h index 2f26e1d681..32214ae83b 100644 --- a/ext/standard/php_math.h +++ b/ext/standard/php_math.h @@ -149,4 +149,21 @@ PHP_FUNCTION(atanh); #define M_SQRT3 1.73205080756887729352 /* sqrt(3) */ #endif +/* Define rounding modes (all are round-to-nearest) */ +#ifndef PHP_ROUND_HALF_UP +#define PHP_ROUND_HALF_UP 0x01 /* Arithmetic rounding, up == away from zero */ +#endif + +#ifndef PHP_ROUND_HALF_DOWN +#define PHP_ROUND_HALF_DOWN 0x02 /* Down == towards zero */ +#endif + +#ifndef PHP_ROUND_HALF_EVEN +#define PHP_ROUND_HALF_EVEN 0x03 /* Banker's rounding */ +#endif + +#ifndef PHP_ROUND_HALF_ODD +#define PHP_ROUND_HALF_ODD 0x04 +#endif + #endif /* PHP_MATH_H */ |