NFloat.Round 方法

定义

重载

Round(NFloat, Int32, MidpointRounding)

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

Round(NFloat, MidpointRounding)

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

Round(NFloat, Int32)

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

Round(NFloat)

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

Round(NFloat, Int32, MidpointRounding)

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小数位数的结果。

实现

适用于

Round(NFloat, MidpointRounding)

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)

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)

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 模式舍入到最接近的整数的结果。

实现

适用于