Half.Abs(Int16) Method

Definition

Returns the absolute value of the specified half-precision float.

[Android.Runtime.Register("abs", "(S)S", "", ApiSince=26)]
public static short Abs (short h);
[<Android.Runtime.Register("abs", "(S)S", "", ApiSince=26)>]
static member Abs : int16 -> int16

Parameters

h
Int16

A half-precision float value

Returns

The absolute value of the specified half-precision float

Attributes

Remarks

Returns the absolute value of the specified half-precision float. Special values are handled in the following ways: <ul> <li>If the specified half-precision float is NaN, the result is NaN</li> <li>If the specified half-precision float is zero (negative or positive), the result is positive zero (see #POSITIVE_ZERO)</li> <li>If the specified half-precision float is infinity (negative or positive), the result is positive infinity (see #POSITIVE_INFINITY)</li> </ul>

Java documentation for android.util.Half.abs(short).

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