共用方式為


BigDecimal.DivideAndRemainder Method

Definition

Overloads

DivideAndRemainder(BigDecimal)

Returns a two-element BigDecimal array containing the result of divideToIntegralValue followed by the result of remainder on the two operands.

DivideAndRemainder(BigDecimal, MathContext)

Returns a two-element BigDecimal array containing the result of divideToIntegralValue followed by the result of remainder on the two operands calculated with rounding according to the context settings.

DivideAndRemainder(BigDecimal)

Returns a two-element BigDecimal array containing the result of divideToIntegralValue followed by the result of remainder on the two operands.

[Android.Runtime.Register("divideAndRemainder", "(Ljava/math/BigDecimal;)[Ljava/math/BigDecimal;", "GetDivideAndRemainder_Ljava_math_BigDecimal_Handler")]
public virtual Java.Math.BigDecimal[]? DivideAndRemainder (Java.Math.BigDecimal? divisor);
[<Android.Runtime.Register("divideAndRemainder", "(Ljava/math/BigDecimal;)[Ljava/math/BigDecimal;", "GetDivideAndRemainder_Ljava_math_BigDecimal_Handler")>]
abstract member DivideAndRemainder : Java.Math.BigDecimal -> Java.Math.BigDecimal[]
override this.DivideAndRemainder : Java.Math.BigDecimal -> Java.Math.BigDecimal[]

Parameters

divisor
BigDecimal

value by which this BigDecimal is to be divided, and the remainder computed.

Returns

a two element BigDecimal array: the quotient (the result of divideToIntegralValue) is the initial element and the remainder is the final element.

Attributes

Exceptions

if divisor == null.

if divisor == 0.

Remarks

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

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.

See also

Applies to

DivideAndRemainder(BigDecimal, MathContext)

Returns a two-element BigDecimal array containing the result of divideToIntegralValue followed by the result of remainder on the two operands calculated with rounding according to the context settings.

[Android.Runtime.Register("divideAndRemainder", "(Ljava/math/BigDecimal;Ljava/math/MathContext;)[Ljava/math/BigDecimal;", "GetDivideAndRemainder_Ljava_math_BigDecimal_Ljava_math_MathContext_Handler")]
public virtual Java.Math.BigDecimal[]? DivideAndRemainder (Java.Math.BigDecimal? divisor, Java.Math.MathContext? mc);
[<Android.Runtime.Register("divideAndRemainder", "(Ljava/math/BigDecimal;Ljava/math/MathContext;)[Ljava/math/BigDecimal;", "GetDivideAndRemainder_Ljava_math_BigDecimal_Ljava_math_MathContext_Handler")>]
abstract member DivideAndRemainder : Java.Math.BigDecimal * Java.Math.MathContext -> Java.Math.BigDecimal[]
override this.DivideAndRemainder : Java.Math.BigDecimal * Java.Math.MathContext -> Java.Math.BigDecimal[]

Parameters

divisor
BigDecimal

value by which this BigDecimal is to be divided, and the remainder computed.

mc
MathContext

the context to use.

Returns

a two element BigDecimal array: the quotient (the result of divideToIntegralValue) is the initial element and the remainder is the final element.

Attributes

Exceptions

if divisor == null.

if divisor == 0.

Remarks

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

See also

Applies to