★ wanayoo — archive 1999 https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/SIMD/maxNumNouvelle recherche | Portail wanayoo

Join MDN and developers like you at Mozilla's View Source conference, November 2-4 in Portland, Oregon. Learn more at https://viewsourceconf.org/.

SIMD.%type%.maxNum()

by 1 contributor:

This article is in need of an editorial review.

This translation is incomplete. Please help translate this article from English.

This is an experimental technology, part of the Harmony (ECMAScript 7) proposal.
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future version of browsers as the spec changes.

静的なSIMD.%type%.maxNum() メソッドは2つのSIMD型のうち最大レーン値をもつ新しいインスタンスを返します(Math.max(a, b))。NaNより数値を選びます。

構文

SIMD.float32x4.maxNum(a, b)
SIMD.float64x2.maxNum(a, b)

引数

a
SIMD型のインスタンス
b
SIMD型の別のインスタンス

戻り値

aとbのうち最大レーン値をもつ新しい対応するSIMDデータ型(Math.max(a, b))。

説明

SIMD.%type%.maxNum() メソッドは2つのSIMD型のうち最大レーン値をもつ新しいインスタンスを返します(Math.max(a, b))。

このメソッドはNaNより数値を選びます。SIMD.%type%.max メソッドは数値よりNaNを選びます。

例

var a = SIMD.float32x4(-1, -2, 3, 5.2);
var b = SIMD.float32x4(0, -4, 6, 5.5);
SIMD.float32x4.maxNum(a, b);
// float32x4[0, -2, 6, 5.5]

var c = SIMD.float64x2(NaN, Infinity)
var d = SIMD.float64x2(1337, 42);
SIMD.float64x2.maxNum(c, d);
// float64x2[1337, Infinity]

仕様

SIMDはまだ公式規格文書やドラフトでサポートされていません。typed arraysに基づいた標準化作業や互換性実装のために、ecmascript_simd GitHub リポジトリを確かめて下さい。

ブラウザ実装状況

機能 Chrome Firefox (Gecko) Internet Explorer Opera Safari
基本サポート 未サポート Nightly build 未サポート 未サポート 未サポート
機能 Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
基本サポート 未サポート 未サポート Nightly build 未サポート 未サポート 未サポート

関連情報

ドキュメントのタグと貢献者

Contributors to this page: shide55
最終更新者: shide55,
サイドバーを隠す