Compartir a través de


BigDecimal.Round(MathContext) Method

Definition

Returns a BigDecimal rounded according to the MathContext settings.

[Android.Runtime.Register("round", "(Ljava/math/MathContext;)Ljava/math/BigDecimal;", "GetRound_Ljava_math_MathContext_Handler")]
public virtual Java.Math.BigDecimal? Round (Java.Math.MathContext? mc);
[<Android.Runtime.Register("round", "(Ljava/math/MathContext;)Ljava/math/BigDecimal;", "GetRound_Ljava_math_MathContext_Handler")>]
abstract member Round : Java.Math.MathContext -> Java.Math.BigDecimal
override this.Round : Java.Math.MathContext -> Java.Math.BigDecimal

Parameters

mc
MathContext

the context to use.

Returns

a BigDecimal rounded according to the MathContext settings.

Attributes

Exceptions

if mc.precision > 0 and mc.roundingMode == UNNECESSARY and this cannot be represented within the given precision.

Remarks

Java documentation for java.math.BigDecimal.round(java.math.MathContext).

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