Επεξεργασία

Κοινή χρήση μέσω


IFloatingPoint<TSelf>.Round Method

Definition

Overloads

Round(TSelf)

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

Round(TSelf, Int32)

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

Round(TSelf, MidpointRounding)

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

Round(TSelf, Int32, MidpointRounding)

Rounds a value to a specified number of fractional digits using the specified rounding mode.

Round(TSelf)

Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs

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

public:
 static override TSelf Round(TSelf x);
public static virtual TSelf Round (TSelf x);
static member Round : 'Self -> 'Self
Public Shared Overrides Function Round (x As TSelf) As TSelf

Parameters

x
TSelf

The value to round.

Returns

TSelf

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

Applies to

Round(TSelf, Int32)

Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs

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

public:
 static override TSelf Round(TSelf x, int digits);
public static virtual TSelf Round (TSelf x, int digits);
static member Round : 'Self * int -> 'Self
Public Shared Overrides Function Round (x As TSelf, digits As Integer) As TSelf

Parameters

x
TSelf

The value to round.

digits
Int32

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

Returns

TSelf

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

Applies to

Round(TSelf, MidpointRounding)

Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs

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

public:
 static override TSelf Round(TSelf x, MidpointRounding mode);
public static virtual TSelf Round (TSelf x, MidpointRounding mode);
static member Round : 'Self * MidpointRounding -> 'Self
Public Shared Overrides Function Round (x As TSelf, mode As MidpointRounding) As TSelf

Parameters

x
TSelf

The value to round.

mode
MidpointRounding

The mode under which x should be rounded.

Returns

TSelf

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

Applies to

Round(TSelf, Int32, MidpointRounding)

Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs
Source:
IFloatingPoint.cs

Rounds a value to a specified number of fractional digits using the specified rounding mode.

public:
 static TSelf Round(TSelf x, int digits, MidpointRounding mode);
public static abstract TSelf Round (TSelf x, int digits, MidpointRounding mode);
static member Round : 'Self * int * MidpointRounding -> 'Self
Public Shared Function Round (x As TSelf, digits As Integer, mode As MidpointRounding) As TSelf

Parameters

x
TSelf

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

TSelf

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

Applies to