Float.FloatToFloat16(Single) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
{
[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:
<ul>
<li> If the argument is zero, the result is a zero with the
same sign as the argument.
<li> If the argument is infinite, the result is an infinity
with the same sign as the argument.
<li> If the argument is a NaN, the result is a NaN.
</ul>
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.