StrictMath.AbsExact Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AbsExact(Int32) |
Returns the mathematical absolute value of an |
AbsExact(Int64) |
Returns the mathematical absolute value of an |
AbsExact(Int32)
Returns the mathematical absolute value of an int
value
if it is exactly representable as an int
, throwing
ArithmeticException
if the result overflows the
positive int
range.
[Android.Runtime.Register("absExact", "(I)I", "", ApiSince=34)]
public static int AbsExact (int a);
[<Android.Runtime.Register("absExact", "(I)I", "", ApiSince=34)>]
static member AbsExact : int -> int
Parameters
- a
- Int32
the argument whose absolute value is to be determined
Returns
the absolute value of the argument, unless overflow occurs
- Attributes
Remarks
Returns the mathematical absolute value of an int
value if it is exactly representable as an int
, throwing ArithmeticException
if the result overflows the positive int
range.
Since the range of two's complement integers is asymmetric with one additional negative value (JLS {
Added in 15.
Java documentation for java.lang.StrictMath.absExact(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
AbsExact(Int64)
Returns the mathematical absolute value of an long
value
if it is exactly representable as an long
, throwing
ArithmeticException
if the result overflows the
positive long
range.
[Android.Runtime.Register("absExact", "(J)J", "", ApiSince=34)]
public static long AbsExact (long a);
[<Android.Runtime.Register("absExact", "(J)J", "", ApiSince=34)>]
static member AbsExact : int64 -> int64
Parameters
- a
- Int64
the argument whose absolute value is to be determined
Returns
the absolute value of the argument, unless overflow occurs
- Attributes
Remarks
Returns the mathematical absolute value of an long
value if it is exactly representable as an long
, throwing ArithmeticException
if the result overflows the positive long
range.
Since the range of two's complement integers is asymmetric with one additional negative value (JLS {
Added in 15.
Java documentation for java.lang.StrictMath.absExact(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.