# RoundingAlgorithm enumeration

Specifies the algorithm used to round numbers.

## Syntax

```
var value = Windows.Globalization.NumberFormatting.RoundingAlgorithm.none;

```

## Members

The RoundingAlgorithm enumeration has these members.

MemberValueDescription
None | none0

No rounding is performed.

RoundDown | roundDown1

Round towards negative infinity. (Return the largest integer, increment, or significant digit which does not exceed the input.)

RoundUp | roundUp2

Round towards infinity. (Return the smallest integer, increment, or significant digit which is not less than the input.)

RoundTowardsZero | roundTowardsZero3

Round towards zero. This is the equivalent of RoundDown if the input is positive, or RoundUp if the input is negative.

RoundAwayFromZero | roundAwayFromZero4

Round away from zero. This is the equivalent of RoundUp if the input is positive, or RoundDown if the input is negative.

RoundHalfDown | roundHalfDown5

Round to the integer, increment, or significant digit that is closest to the input. If the input is exactly halfway between the possible outputs, this is the equivalent of RoundDown.

RoundHalfUp | roundHalfUp6

Round to the integer, increment, or significant digit that is closest to the input. If the input is exactly halfway between the possible outputs, this is the equivalent of RoundUp.

RoundHalfTowardsZero | roundHalfTowardsZero7

Round to the integer, increment, or significant digit that is closest to the input. If the input is exactly halfway between the possible outputs, this is the equivalent of RoundTowardsZero.

RoundHalfAwayFromZero | roundHalfAwayFromZero8

Round to the integer, increment, or significant digit that is closest to the input. If the input is exactly halfway between the possible outputs, this is the equivalent of RoundAwayFromZero.

RoundHalfToEven | roundHalfToEven9

Round to the integer, increment, or significant digit that is closest to the input. If the input is exactly halfway between the possible outputs, round to the nearest even output.

RoundHalfToOdd | roundHalfToOdd10

Round to the integer, increment, or significant digit that is closest to the input. If the input is exactly halfway between the possible outputs, round to the nearest odd output.

## Requirements (Windows 10 device family)

 Device family Universal Windows.Foundation.UniversalApiContract, introduced version 1.0 Windows.Globalization.NumberFormatting Windows::Globalization::NumberFormatting [C++] Windows.Foundation.UniversalApiContract.winmd

## Requirements (Windows 8.x and Windows Phone 8.x)

 Minimum supported client Windows 8.1 Windows Server 2012 R2 Windows Phone 8.1 [Windows Runtime apps only] Windows.Globalization.NumberFormatting Windows::Globalization::NumberFormatting [C++] Windows.winmd

## Attributes

[Version(0x06030000)]

Show: