共用方式為


IncrementNumberRounder.RoundSingle(Single) 方法

定義

一數位四捨五入為指定的增量。

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)

備註

舍入策略是以 IncrementRoundingAlgorithm的值為基礎。

注意

這個方法只有在 Single 資料類型或大約 7 位數的限制內才精確。

適用於