Half.Round 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Round(Half) |
使用默认舍入模式将值舍入到最接近的整数(ToEven)。 |
| Round(Half, Int32) |
使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。 |
| Round(Half, MidpointRounding) |
使用指定的舍入模式将值舍入到最接近的整数。 |
| Round(Half, Int32, MidpointRounding) |
使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。 |
Round(Half)
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
使用默认舍入模式将值舍入到最接近的整数(ToEven)。
public:
static Half Round(Half x) = System::Numerics::IFloatingPoint<Half>::Round;
public static Half Round(Half x);
static member Round : Half -> Half
Public Shared Function Round (x As Half) As Half
参数
- x
- Half
要舍入的值。
返回
使用默认舍入模式舍入 x 到最接近的整数的结果。
实现
适用于
Round(Half, Int32)
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。
public:
static Half Round(Half x, int digits) = System::Numerics::IFloatingPoint<Half>::Round;
public static Half Round(Half x, int digits);
static member Round : Half * int -> Half
Public Shared Function Round (x As Half, digits As Integer) As Half
参数
- x
- Half
要舍入的值。
- digits
- Int32
应舍入到的小 x 数位数。
返回
使用默认舍入模式舍入 x 到 digits 小数位数的结果。
实现
适用于
Round(Half, MidpointRounding)
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
使用指定的舍入模式将值舍入到最接近的整数。
public:
static Half Round(Half x, MidpointRounding mode) = System::Numerics::IFloatingPoint<Half>::Round;
public static Half Round(Half x, MidpointRounding mode);
static member Round : Half * MidpointRounding -> Half
Public Shared Function Round (x As Half, mode As MidpointRounding) As Half
参数
- x
- Half
要舍入的值。
- mode
- MidpointRounding
应在其下舍入的 x 模式。
返回
使用 x. 将舍入mode到最接近的整数的结果。
实现
适用于
Round(Half, Int32, MidpointRounding)
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
- Source:
- Half.cs
使用默认舍入模式将值舍入为指定数量的小数位数(ToEven)。
public:
static Half Round(Half x, int digits, MidpointRounding mode) = System::Numerics::IFloatingPoint<Half>::Round;
public static Half Round(Half x, int digits, MidpointRounding mode);
static member Round : Half * int * MidpointRounding -> Half
Public Shared Function Round (x As Half, digits As Integer, mode As MidpointRounding) As Half
参数
- x
- Half
要舍入的值。
- digits
- Int32
应舍入到的小 x 数位数。
- mode
- MidpointRounding
应在其下舍入的 x 模式。
返回
使用x小数位数舍入digits到mode小数位数的结果。