# The RoundingMode Enum

(PHP 8 >= 8.4.0)

## 简介

The RoundingMode enum is used to specify how rounding should be performed for round(), bcround(), and BcMath\Number::round().

## 注解摘要

enum RoundingMode
{
case HalfAwayFromZero ; // Round to the nearest integer. If the decimal part is `5`, round to the integer with the larger absolute value.
case HalfTowardsZero ; // Round to the nearest integer. If the decimal part is `5`, round to the integer with the smaller absolute value.
case HalfEven ; // Round to the nearest integer. If the decimal part is `5`, round to the even integer.
case HalfOdd ; // Round to the nearest integer. If the decimal part is `5`, round to the odd integer.
case TowardsZero ; // Round to the nearest integer with a smaller or equal absolute value.
case AwayFromZero ; // Round to the nearest integer with a greater or equal absolute value.
case NegativeInfinity ; // Round to the largest integer that is smaller or equal.
case PositiveInfinity ; // Round to the smallest integer that is greater or equal.
}
`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open