RoundMode Enum
Specifies the mode of rounding a value.
public enum RoundMode
Fields
Name | Description |
---|---|
Ceiling | The smallest integer greater than or equal to the value is returned. |
CeilingToEven | The smallest even integer greater than or equal to the value is returned. |
CeilingToOdd | The smallest odd integer greater than or equal to the value is returned. |
Floor | The largest integer less than or equal to the value is returned. |
FloorToEven | The largest even integer less than or equal to the value is returned. |
FloorToOdd | The largest odd integer less than or equal to the value is returned. |
Nearest | The closest integer to the value is returned. When the value is halfway between two integers, it is rounded towards the integer further away from zero. |
NearestEven | The closest even integer to the value is returned. When the value is halfway between two even integers, it is rounded towards the integer further away from zero. |
NearestOdd | The closest odd integer to the value is returned. When the value is halfway between two odd integers, it is rounded towards the integer further away from zero. |