Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SignificantDigitsNumberRounder Class

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Rounds numbers to a specified number of significant digits.

public ref class SignificantDigitsNumberRounder sealed : INumberRounder
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SignificantDigitsNumberRounder final : INumberRounder
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class SignificantDigitsNumberRounder final : INumberRounder
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SignificantDigitsNumberRounder : INumberRounder
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SignificantDigitsNumberRounder : INumberRounder
function SignificantDigitsNumberRounder()
Public NotInheritable Class SignificantDigitsNumberRounder
Implements INumberRounder
Inheritance
Object Platform::Object IInspectable SignificantDigitsNumberRounder
Attributes
Implements

Windows requirements

Requirements Description
Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Constructors

Name Description
SignificantDigitsNumberRounder()

Creates a SignificantDigitsNumberRounder object.

This constructor initializes RoundingAlgorithm to a default value of RoundingAlgorithm.RoundHalfUp, and SignificantDigits to 0.

Properties

Name Description
RoundingAlgorithm

Gets or sets the rounding strategy value for this SignificantDigitsNumberRounder object.

SignificantDigits

Gets or sets the number of significant digits this SignificantDigitsNumberRounder object uses for rounding.

Methods

Name Description
RoundDouble(Double)

Rounds a Double number to the specified number of significant digits.

RoundInt32(Int32)

Rounds an Int32 number to the specified number of significant digits.

RoundInt64(Int64)

Rounds an Int64 number to the specified number of significant digits.

RoundSingle(Single)

Rounds a Single number to the specified number of significant digits.

RoundUInt32(UInt32)

Rounds a UInt32 number to the specified number of significant digits.

RoundUInt64(UInt64)

Rounds a UInt64 number to the specified number of significant digits.

Applies to

See also


Feedback

Was this page helpful?