NFloat.Round 方法

定义

重载

名称 说明
Round(NFloat)

使用默认舍入模式将值舍入到最接近的整数(ToEven)。

Round(NFloat, Int32)

使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。

Round(NFloat, MidpointRounding)

使用指定的舍入模式将值舍入到最接近的整数。

Round(NFloat, Int32, MidpointRounding)

使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。

Round(NFloat)

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

使用默认舍入模式将值舍入到最接近的整数(ToEven)。

public:
 static System::Runtime::InteropServices::NFloat Round(System::Runtime::InteropServices::NFloat x) = System::Numerics::IFloatingPoint<System::Runtime::InteropServices::NFloat>::Round;
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x);
static member Round : System.Runtime.InteropServices.NFloat -> System.Runtime.InteropServices.NFloat
Public Shared Function Round (x As NFloat) As NFloat

参数

x
NFloat

要舍入的值。

返回

使用默认舍入模式舍入 x 到最接近的整数的结果。

实现

适用于

Round(NFloat, Int32)

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

使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。

public:
 static System::Runtime::InteropServices::NFloat Round(System::Runtime::InteropServices::NFloat x, int digits) = System::Numerics::IFloatingPoint<System::Runtime::InteropServices::NFloat>::Round;
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x, int digits);
static member Round : System.Runtime.InteropServices.NFloat * int -> System.Runtime.InteropServices.NFloat
Public Shared Function Round (x As NFloat, digits As Integer) As NFloat

参数

x
NFloat

要舍入的值。

digits
Int32

应舍入到的小 x 数位数。

返回

使用默认舍入模式舍入 xdigits 小数位数的结果。

实现

适用于

Round(NFloat, MidpointRounding)

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

使用指定的舍入模式将值舍入到最接近的整数。

public:
 static System::Runtime::InteropServices::NFloat Round(System::Runtime::InteropServices::NFloat x, MidpointRounding mode) = System::Numerics::IFloatingPoint<System::Runtime::InteropServices::NFloat>::Round;
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x, MidpointRounding mode);
static member Round : System.Runtime.InteropServices.NFloat * MidpointRounding -> System.Runtime.InteropServices.NFloat
Public Shared Function Round (x As NFloat, mode As MidpointRounding) As NFloat

参数

x
NFloat

要舍入的值。

mode
MidpointRounding

应在其下舍入的 x 模式。

返回

使用 mode. 将舍入x到最接近的整数的结果。

实现

适用于

Round(NFloat, Int32, MidpointRounding)

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

使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。

public:
 static System::Runtime::InteropServices::NFloat Round(System::Runtime::InteropServices::NFloat x, int digits, MidpointRounding mode) = System::Numerics::IFloatingPoint<System::Runtime::InteropServices::NFloat>::Round;
public static System.Runtime.InteropServices.NFloat Round(System.Runtime.InteropServices.NFloat x, int digits, MidpointRounding mode);
static member Round : System.Runtime.InteropServices.NFloat * int * MidpointRounding -> System.Runtime.InteropServices.NFloat
Public Shared Function Round (x As NFloat, digits As Integer, mode As MidpointRounding) As NFloat

参数

x
NFloat

要舍入的值。

digits
Int32

应舍入到的小 x 数位数。

mode
MidpointRounding

应在其下舍入的 x 模式。

返回

使用mode小数位数舍入xdigits小数位数的结果。

实现

适用于