IncrementNumberRounder.RoundSingle(Single) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將 單 一數位四捨五入為指定的增量。
public:
virtual float RoundSingle(float value) = RoundSingle;
float RoundSingle(float const& value);
public float RoundSingle(float value);
function roundSingle(value)
Public Function RoundSingle (value As Single) As Single
參數
- value
-
Single
float
要四捨五入的 Single 值。
傳回
Single
float
四捨五入的數位。 此結果是單精確度浮點數,不一定是整數。
實作
M:Windows.Globalization.NumberFormatting.INumberRounder.RoundSingle(System.Single)
M:Windows.Globalization.NumberFormatting.INumberRounder.RoundSingle(float)
備註
舍入策略是以 Increment 和 RoundingAlgorithm的值為基礎。
注意
這個方法只有在 Single 資料類型或大約 7 位數的限制內才精確。