다음을 통해 공유


BigDecimal.Abs Method

Definition

Overloads

Abs()

Returns a plain BigDecimal whose value is the absolute value of this BigDecimal.

Abs(MathContext)

Returns a BigDecimal whose value is the absolute value of this BigDecimal.

Abs()

Returns a plain BigDecimal whose value is the absolute value of this BigDecimal.

[Android.Runtime.Register("abs", "()Landroid/icu/math/BigDecimal;", "GetAbsHandler", ApiSince=24)]
public virtual Android.Icu.Math.BigDecimal? Abs ();
[<Android.Runtime.Register("abs", "()Landroid/icu/math/BigDecimal;", "GetAbsHandler", ApiSince=24)>]
abstract member Abs : unit -> Android.Icu.Math.BigDecimal
override this.Abs : unit -> Android.Icu.Math.BigDecimal

Returns

A BigDecimal whose value is the absolute value of this BigDecimal.

Attributes

Remarks

Returns a plain BigDecimal whose value is the absolute value of this BigDecimal.

The same as #abs(MathContext), where the context is new MathContext(0, MathContext.PLAIN).

The length of the decimal part (the scale) of the result will be this.scale()

Java documentation for android.icu.math.BigDecimal.abs().

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

Abs(MathContext)

Returns a BigDecimal whose value is the absolute value of this BigDecimal.

[Android.Runtime.Register("abs", "(Landroid/icu/math/MathContext;)Landroid/icu/math/BigDecimal;", "GetAbs_Landroid_icu_math_MathContext_Handler", ApiSince=24)]
public virtual Android.Icu.Math.BigDecimal? Abs (Android.Icu.Math.MathContext? set);
[<Android.Runtime.Register("abs", "(Landroid/icu/math/MathContext;)Landroid/icu/math/BigDecimal;", "GetAbs_Landroid_icu_math_MathContext_Handler", ApiSince=24)>]
abstract member Abs : Android.Icu.Math.MathContext -> Android.Icu.Math.BigDecimal
override this.Abs : Android.Icu.Math.MathContext -> Android.Icu.Math.BigDecimal

Parameters

set
MathContext

The MathContext arithmetic settings.

Returns

A BigDecimal whose value is the absolute value of this BigDecimal.

Attributes

Remarks

Returns a BigDecimal whose value is the absolute value of this BigDecimal.

If the current object is zero or positive, then the same result as invoking the #plus(MathContext) method with the same parameter is returned. Otherwise, the same result as invoking the #negate(MathContext) method with the same parameter is returned.

Java documentation for android.icu.math.BigDecimal.abs(android.icu.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