Udostępnij za pośrednictwem


Half.ToHexString(Int16) Method

Definition

Returns a hexadecimal string representation of the specified half-precision float value.

[Android.Runtime.Register("toHexString", "(S)Ljava/lang/String;", "", ApiSince=26)]
public static string ToHexString (short h);
[<Android.Runtime.Register("toHexString", "(S)Ljava/lang/String;", "", ApiSince=26)>]
static member ToHexString : int16 -> string

Parameters

h
Int16

A half-precision float value

Returns

A hexadecimal string representation of the specified value

Attributes

Remarks

Returns a hexadecimal string representation of the specified half-precision float value. If the value is a NaN, the result is "NaN", otherwise the result follows this format:

<ul> <li>If the sign is positive, no sign character appears in the result</li> <li>If the sign is negative, the first character is '-'</li> <li>If the value is inifinity, the string is "Infinity"</li> <li>If the value is 0, the string is "0x0.0p0"</li> <li>If the value has a normalized representation, the exponent and significand are represented in the string in two fields. The significand starts with "0x1." followed by its lowercase hexadecimal representation. Trailing zeroes are removed unless all digits are 0, then a single zero is used. The significand representation is followed by the exponent, represented by "p", itself followed by a decimal string of the unbiased exponent</li> <li>If the value has a subnormal representation, the significand starts with "0x0." followed by its lowercase hexadecimal representation. Trailing zeroes are removed unless all digits are 0, then a single zero is used. The significand representation is followed by the exponent, represented by "p-14"</li> </ul>

Java documentation for android.util.Half.toHexString(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