Float.FloatToFloat16(Single) メソッド

定義

{

[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

パラメーター

f
Single

binary16 に変換する float

返品

引数に最も近い shortでエンコードされた浮動小数点 binary16 値} 変換は、java.math.RoundingMode#HALF_EVENで計算され、最も近い偶数丸めモードに丸めます。

        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.
属性

注釈

{

20 で追加されました。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象