Math.Abs Method

Definition

Overloads

Abs(Double)

Returns the absolute value of a double value.

Abs(Int32)

Returns the absolute value of an int value.

Abs(Int64)

Returns the absolute value of a long value.

Abs(Single)

Returns the absolute value of a float value.

Abs(Double)

Returns the absolute value of a double value.

[Android.Runtime.Register("abs", "(D)D", "")]
public static double Abs (double a);
[<Android.Runtime.Register("abs", "(D)D", "")>]
static member Abs : double -> double

Parameters

a
Double

the argument whose absolute value is to be determined

Returns

the absolute value of the argument.

Attributes

Remarks

Java documentation for java.lang.Math.abs(double).

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(Int32)

Returns the absolute value of an int value.

[Android.Runtime.Register("abs", "(I)I", "")]
public static int Abs (int a);
[<Android.Runtime.Register("abs", "(I)I", "")>]
static member Abs : int -> int

Parameters

a
Int32

the argument whose absolute value is to be determined

Returns

the absolute value of the argument.

Attributes

Remarks

Java documentation for java.lang.Math.abs(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

Abs(Int64)

Returns the absolute value of a long value.

[Android.Runtime.Register("abs", "(J)J", "")]
public static long Abs (long a);
[<Android.Runtime.Register("abs", "(J)J", "")>]
static member Abs : int64 -> int64

Parameters

a
Int64

the argument whose absolute value is to be determined

Returns

the absolute value of the argument.

Attributes

Remarks

Java documentation for java.lang.Math.abs(long).

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(Single)

Returns the absolute value of a float value.

[Android.Runtime.Register("abs", "(F)F", "")]
public static float Abs (float a);
[<Android.Runtime.Register("abs", "(F)F", "")>]
static member Abs : single -> single

Parameters

a
Single

the argument whose absolute value is to be determined

Returns

the absolute value of the argument.

Attributes

Remarks

Java documentation for java.lang.Math.abs(float).

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