Share via


BigDecimal.Negate Method

Definition

Overloads

Negate()

Returns a BigDecimal whose value is (-this), and whose scale is this.scale().

Negate(MathContext)

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

Negate()

Returns a BigDecimal whose value is (-this), and whose scale is this.scale().

[Android.Runtime.Register("negate", "()Ljava/math/BigDecimal;", "GetNegateHandler")]
public virtual Java.Math.BigDecimal? Negate ();
[<Android.Runtime.Register("negate", "()Ljava/math/BigDecimal;", "GetNegateHandler")>]
abstract member Negate : unit -> Java.Math.BigDecimal
override this.Negate : unit -> Java.Math.BigDecimal

Returns

-this.

Attributes

Remarks

Java documentation for java.math.BigDecimal.negate().

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

Negate(MathContext)

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

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

Parameters

mc
MathContext

the context to use.

Returns

-this, rounded as necessary.

Attributes

Remarks

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