Langage

Float.FloatToFloat16(Single) Méthode

Définition

{

[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

Paramètres

f
Single

valeur float à convertir en binaire16

Retours

la valeur binary16 à virgule flottante, encodée dans une shortvaleur la plus proche de l’argument} La conversion est calculée sous java.math.RoundingMode#HALF_EVEN arrondi au mode d’arrondi le plus proche.

        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.
Attributs

Remarques

{

Ajouté en 20.

Java documentation pour java.lang.Float.floatToFloat16(float).

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à