Skip to main content

MidpointRounding

Specifies the strategy that mathematical rounding methods should use to round a number.

Enums

NameValueDescription
ToEven0The strategy of rounding to the nearest number, and when a number is halfway between two others, it's rounded toward the nearest even number
AwayFromZero1The strategy of rounding to the nearest number, and when a number is halfway between two others, it's rounded toward the nearest number that's away from zero
ToZero2The strategy of directed rounding toward zero, with the result closest to and no greater in magnitude than the infinitely precise result
ToNegativeInfinity3The strategy of downwards-directed rounding, with the result closest to and no greater than the infinitely precise result
ToPositiveInfinity4The strategy of upwards-directed rounding, with the result closest to and no less than the infinitely precise result