NFloat.Round 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Round(NFloat, Int32, MidpointRounding) |
使用預設四捨五入模式,將值四捨五入為指定的小數位數, (ToEven) 。 |
Round(NFloat, MidpointRounding) |
使用指定的進位模式,將值四捨五入為最接近的整數。 |
Round(NFloat, Int32) |
使用預設四捨五入模式,將值四捨五入為指定的小數位數, (ToEven) 。 |
Round(NFloat) |
使用預設四捨五入模式將值四捨五入為最接近的整數, (ToEven) 。 |
Round(NFloat, Int32, MidpointRounding)
- 來源:
- NFloat.cs
- 來源:
- NFloat.cs
- 來源:
- 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
四捨五入 x
至 digits
小數位數的結果。
實作
適用於
Round(NFloat, MidpointRounding)
- 來源:
- NFloat.cs
- 來源:
- NFloat.cs
- 來源:
- 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)
- 來源:
- NFloat.cs
- 來源:
- NFloat.cs
- 來源:
- 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
。
傳回
使用預設四捨五入模式四捨五入 x
至 digits
小數位數的結果。
實作
適用於
Round(NFloat)
- 來源:
- NFloat.cs
- 來源:
- NFloat.cs
- 來源:
- 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
至最接近整數的結果。
實作
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應