Compartilhar via


MathContext.RoundHalfUp Field

Definition

Caution

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

Rounding mode to round to nearest neighbor, where an equidistant value is rounded up.

[Android.Runtime.Register("ROUND_HALF_UP", 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 RoundHalfUp = 4;
[<Android.Runtime.Register("ROUND_HALF_UP", 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 RoundHalfUp : Android.Icu.Math.RoundOptionsUnused

Field Value

Value = 4
Attributes

Remarks

Rounding mode to round to nearest neighbor, where an equidistant value is rounded up. Used as a setting to control the rounding mode used during a BigDecimal operation.

If the discarded digits represent greater than or equal to half (0.5 times) the value of a one in the next position then the result should be rounded up (away from zero). Otherwise the discarded digits are ignored.

Java documentation for android.icu.math.MathContext.ROUND_HALF_UP.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to