NFloat.Round Method

Definition

Overloads

Round(NFloat)

Rounds a value to the nearest integer using the default rounding mode (ToEven).

Round(NFloat, Int32)

Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven).

Round(NFloat, MidpointRounding)

Rounds a value to the nearest integer using the specified rounding mode.

Round(NFloat, Int32, MidpointRounding)

Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven).

Round(NFloat)

Source:
NFloat.cs
Source:
NFloat.cs
Source:
NFloat.cs

Rounds a value to the nearest integer using the default rounding mode (ToEven).

C#
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x);

Parameters

x
NFloat

The value to round.

Returns

The result of rounding x to the nearest integer using the default rounding mode.

Implements

Applies to

.NET 10 a ďalšie verzie
Produkt Verzie
.NET 7, 8, 9, 10

Round(NFloat, Int32)

Source:
NFloat.cs
Source:
NFloat.cs
Source:
NFloat.cs

Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven).

C#
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x, int digits);

Parameters

x
NFloat

The value to round.

digits
Int32

The number of fractional digits to which x should be rounded.

Returns

The result of rounding x to digits fractional-digits using the default rounding mode.

Implements

Applies to

.NET 10 a ďalšie verzie
Produkt Verzie
.NET 7, 8, 9, 10

Round(NFloat, MidpointRounding)

Source:
NFloat.cs
Source:
NFloat.cs
Source:
NFloat.cs

Rounds a value to the nearest integer using the specified rounding mode.

C#
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x, MidpointRounding mode);

Parameters

x
NFloat

The value to round.

mode
MidpointRounding

The mode under which x should be rounded.

Returns

The result of rounding x to the nearest integer using mode.

Implements

Applies to

.NET 10 a ďalšie verzie
Produkt Verzie
.NET 7, 8, 9, 10

Round(NFloat, Int32, MidpointRounding)

Source:
NFloat.cs
Source:
NFloat.cs
Source:
NFloat.cs

Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven).

C#
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x, int digits, MidpointRounding mode);

Parameters

x
NFloat

The value to round.

digits
Int32

The number of fractional digits to which x should be rounded.

mode
MidpointRounding

The mode under which x should be rounded.

Returns

The result of rounding x to digits fractional-digits using mode.

Implements

Applies to

.NET 10 a ďalšie verzie
Produkt Verzie
.NET 7, 8, 9, 10