Aracılığıyla paylaş


MathContext Constructors

Definition

Overloads

MathContext(Int32)

Constructs a new MathContext with the specified precision and the RoundingMode#HALF_UP HALF_UP rounding mode.

MathContext(String)

Constructs a new MathContext from a string.

MathContext(Int32, RoundingMode)

Constructs a new MathContext with a specified precision and rounding mode.

MathContext(Int32)

Constructs a new MathContext with the specified precision and the RoundingMode#HALF_UP HALF_UP rounding mode.

[Android.Runtime.Register(".ctor", "(I)V", "")]
public MathContext (int setPrecision);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Java.Math.MathContext : int -> Java.Math.MathContext

Parameters

setPrecision
Int32

The non-negative int precision setting.

Attributes

Exceptions

if precision .

Remarks

Constructs a new MathContext with the specified precision and the RoundingMode#HALF_UP HALF_UP rounding mode.

Java documentation for java.math.MathContext.MathContext(.*int).

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

MathContext(String)

Constructs a new MathContext from a string.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public MathContext (string? val);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Math.MathContext : string -> Java.Math.MathContext

Parameters

val
String

The string to be parsed

Attributes

Exceptions

if the string is not in the correct format or if the precision specified is

Remarks

Java documentation for java.math.MathContext.MathContext(java.lang.String).

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

MathContext(Int32, RoundingMode)

Constructs a new MathContext with a specified precision and rounding mode.

[Android.Runtime.Register(".ctor", "(ILjava/math/RoundingMode;)V", "")]
public MathContext (int setPrecision, Java.Math.RoundingMode? setRoundingMode);
[<Android.Runtime.Register(".ctor", "(ILjava/math/RoundingMode;)V", "")>]
new Java.Math.MathContext : int * Java.Math.RoundingMode -> Java.Math.MathContext

Parameters

setPrecision
Int32

The non-negative int precision setting.

setRoundingMode
RoundingMode

The rounding mode to use.

Attributes

Exceptions

if precision .

if roundingMode is null.

Remarks

Java documentation for java.math.MathContext.MathContext(int, java.math.RoundingMode).

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