Lenguaje

Float.FloatToFloat16(Single) Método

Definición

{

[Android.Runtime.Register("floatToFloat16", "(F)S", "", ApiSince=36)]
public static short FloatToFloat16(float f);
[<Android.Runtime.Register("floatToFloat16", "(F)S", "", ApiSince=36)>]
static member FloatToFloat16 : single -> int16

Parámetros

f
Single

el float valor que se va a convertir en binary16

Devoluciones

valor binario de punto flotante16, codificado en un short, más cercano en el valor al argumento} La conversión se calcula en el modo java.math.RoundingMode#HALF_EVEN redondeo al modo de redondeo par más cercano.

        Special cases:
        &lt;ul&gt;
        &lt;li&gt; If the argument is zero, the result is a zero with the
        same sign as the argument.
        &lt;li&gt; If the argument is infinite, the result is an infinity
        with the same sign as the argument.
        &lt;li&gt; If the argument is a NaN, the result is a NaN.
        &lt;/ul&gt;

        The binary16 format is discussed in
        more detail in the <code data-dev-comment-type="c">#float16ToFloat</code> method.
Atributos

Comentarios

{

Agregado en 20.

Java documentación para java.lang.Float.floatToFloat16(float).

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el Android y se usan según los términos descritos en creative Creative Commons 2.5 Attribution License.

Se aplica a