Half.Round 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Round(Half) |
使用預設的四捨五入模式(ToEven)將值捨入至最近的整數。 |
| Round(Half, Int32) |
使用預設的四捨五入模式()ToEven將數值四捨五入至指定數量的分數位數。 |
| Round(Half, MidpointRounding) |
使用指定的四捨五入模式將值捨入至最近的整數。 |
| Round(Half, Int32, MidpointRounding) |
使用預設的四捨五入模式()ToEven將數值四捨五入至指定數量的分數位數。 |
Round(Half)
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- 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)
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- 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 整數位數。
傳回
這是使用預設四捨五入模式將整數xdigits到小數位數的結果。
實作
適用於
Round(Half, MidpointRounding)
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- 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)
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- Half.cs
- 來源:
- 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將整數為 digitsmode 的結果。