語言

MathContext.RoundHalfEven 欄位

定義

警告

This constant will be removed in the future version. Use Android.Icu.Math.RoundOptionsUnused enum directly instead of this field.

將四捨五入模式轉為四捨五入至最近鄰,將等距值四捨五入至最近偶鄰。

[Android.Runtime.Register("ROUND_HALF_EVEN", ApiSince=24)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Icu.Math.RoundOptionsUnused enum directly instead of this field.", true)]
public const Android.Icu.Math.RoundOptionsUnused RoundHalfEven = 6;
[<Android.Runtime.Register("ROUND_HALF_EVEN", ApiSince=24)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Icu.Math.RoundOptionsUnused enum directly instead of this field.", true)>]
val mutable RoundHalfEven : Android.Icu.Math.RoundOptionsUnused

欄位值

Value = 6
屬性

備註

將四捨五入模式轉為四捨五入至最近鄰,將等距值四捨五入至最近偶鄰。 用作控制操作過程中 BigDecimal 所用的四捨五入模式的設定。

若棄置的數字代表下一位置 1 值的一半(0.5 倍),則應向上取整(遠離零)。 若代表少於一半,則結果應向下取整。

否則(它們正好代表一半),如果最右邊的數字是偶數,結果會向下取整;如果最右邊的數字是奇數,則向上取整(使得偶數位)。

Java 文件 android.icu.math.MathContext.ROUND_HALF_EVEN。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於