The RoundingMode Enum
The RoundingMode enum is used to specify how rounding should be performed for round, bcround, and BcMath\Number::round.
Intro
The RoundingMode enum is used to specify how rounding should be performed for round(), bcround(), and BcMath\Number::round.
Enumsynopsis
RoundingModeHalfAwayFromZeroRound to the nearest integer. If the decimal part is 5, round to the integer with the larger absolute value.HalfTowardsZeroRound to the nearest integer. If the decimal part is 5, round to the integer with the smaller absolute value.HalfEvenRound to the nearest integer. If the decimal part is 5, round to the even integer.HalfOddRound to the nearest integer. If the decimal part is 5, round to the odd integer.TowardsZeroRound to the nearest integer with a smaller or equal absolute value.AwayFromZeroRound to the nearest integer with a greater or equal absolute value.NegativeInfinityRound to the largest integer that is smaller or equal.PositiveInfinityRound to the smallest integer that is greater or equal.