BigDecimal.Subtract Method (Java.Math)

Returns a BigDecimal whose value is (this - subtrahend),
with rounding according to the context settings.

[Android.Runtime.Register("subtract", "(Ljava/math/BigDecimal;Ljava/math/MathContext;)Ljava/math/BigDecimal;", "GetSubtract_Ljava_math_BigDecimal_Ljava_math_MathContext_Handler")]
public virtual Java.Math.BigDecimal? Subtract (Java.Math.BigDecimal? subtrahend, Java.Math.MathContext? mc);
[<Android.Runtime.Register("subtract", "(Ljava/math/BigDecimal;Ljava/math/MathContext;)Ljava/math/BigDecimal;", "GetSubtract_Ljava_math_BigDecimal_Ljava_math_MathContext_Handler")>]
abstract member Subtract : Java.Math.BigDecimal * Java.Math.MathContext -> Java.Math.BigDecimal
override this.Subtract : Java.Math.BigDecimal * Java.Math.MathContext -> Java.Math.BigDecimal

Parameters

subtrahend

BigDecimal

value to be subtracted from this BigDecimal.

mc

MathContext

the context to use.

Returns

this - subtrahend, rounded as necessary.

Attributes
RegisterAttribute

Exceptions

NullPointerException

if subtrahend == null or mc == null.

Remarks

Java documentation for java.math.BigDecimal.subtract(java.math.BigDecimal, 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