INumberRounder INumberRounder INumberRounder INumberRounder Interface

Definition

An interface that returns rounded results for provided numbers of several data types.

public interface INumberRounderpublic interface INumberRounderPublic Interface INumberRounderpublic interface INumberRounder
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

RoundDouble(Double) RoundDouble(Double) RoundDouble(Double) RoundDouble(Double)

Rounds a Double number.

public double RoundDouble(Double value)public double RoundDouble(Double value)Public Function RoundDouble(value As Double) As doublepublic double RoundDouble(Double value)
Parameters
value
System.Double System.Double System.Double System.Double

The Double value to be rounded.

Returns
double double double double

The rounded number. This result is a double precision floating point number, which is not necessarily an integer.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Note

This method is precise only within the limits of the Double data type: approximately 15 digits.

RoundInt32(Int32) RoundInt32(Int32) RoundInt32(Int32) RoundInt32(Int32)

Rounds an Int32 number.

public int RoundInt32(Int32 value)public int RoundInt32(Int32 value)Public Function RoundInt32(value As Int32) As intpublic int RoundInt32(Int32 value)
Parameters
value
System.Int32 System.Int32 System.Int32 System.Int32

The Int32 value to be rounded.

Returns
int int int int

The rounded 32 bit integer.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

RoundInt64(Int64) RoundInt64(Int64) RoundInt64(Int64) RoundInt64(Int64)

Rounds an Int64 number.

public long RoundInt64(Int64 value)public long RoundInt64(Int64 value)Public Function RoundInt64(value As Int64) As longpublic long RoundInt64(Int64 value)
Parameters
value
System.Int64 System.Int64 System.Int64 System.Int64

The Int64 value to be rounded.

Returns
long long long long

The rounded 64 bit integer.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

RoundSingle(Single) RoundSingle(Single) RoundSingle(Single) RoundSingle(Single)

Rounds a Single number.

public float RoundSingle(Single value)public float RoundSingle(Single value)Public Function RoundSingle(value As Single) As floatpublic float RoundSingle(Single value)
Parameters
value
System.Single System.Single System.Single System.Single

The Single value to be rounded.

Returns
float float float float

The rounded number. This result is a single precision floating point number, which is not necessarily an integer.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Note

This method is precise only within the limits of the Single data type: approximately 7 digits.

RoundUInt32(UInt32) RoundUInt32(UInt32) RoundUInt32(UInt32) RoundUInt32(UInt32)

Rounds a UInt32 number.

public uint RoundUInt32(UInt32 value)public uint RoundUInt32(UInt32 value)Public Function RoundUInt32(value As UInt32) As uintpublic uint RoundUInt32(UInt32 value)
Parameters
value
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The UInt32 value to be rounded.

Returns
uint uint uint uint

The rounded unsigned 32 bit integer.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

RoundUInt64(UInt64) RoundUInt64(UInt64) RoundUInt64(UInt64) RoundUInt64(UInt64)

Rounds a UInt64 number.

public ulong RoundUInt64(UInt64 value)public ulong RoundUInt64(UInt64 value)Public Function RoundUInt64(value As UInt64) As ulongpublic ulong RoundUInt64(UInt64 value)
Parameters
value
System.UInt64 System.UInt64 System.UInt64 System.UInt64

The UInt64 value to be rounded.

Returns
ulong ulong ulong ulong

The rounded unsigned 64 bit integer.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)