Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
enum System.MidpointRounding
Assembly: System.Runtime
Specifies the strategy that mathematical rounding methods should use to round a number.
Values
ToEven
The strategy of rounding to the nearest number, and when a number is halfway between two others, it's rounded toward the nearest even number.
AwayFromZero
The 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.
ToZero
The strategy of directed rounding toward zero, with the result closest to and no greater in magnitude than the infinitely precise result.
ToNegativeInfinity
The strategy of downwards-directed rounding, with the result closest to and no greater than the infinitely precise result.
ToPositiveInfinity
The strategy of upwards-directed rounding, with the result closest to and no less than the infinitely precise result.