SIMD.fromInt32x4

SIMD.fromInt32x4

SIMD.js已经从TC39中取消了积极的开发,并从第三阶段中删除了。它不再被网页浏览器所追求。暴露在 web 上的SIMD 操作在 WebAssembly 中正处于积极的发展之中, 其操作基于 SIMD. js 操作。

静态SIMD.%type%.fromInt32x4()方法创建一个新的SIMD数据类型,并从Int32x4进行浮点数转换。

语法

SIMD.Float32x4.fromInt32x4(t)

参数

t要转换的Int32x4 SIMD类型。

返回值

一个新的SIMD数据类型,从Int32x4进行浮点数转换。

例子

SIMD.Float32x4.fromInt32x4

var t = SIMD.Int32x4(1, 2, 3, 4 SIMD.Float32x4.fromInt32x4(t // Float32x4[1.0, 2.0, 3.0, 4.0]

Specifications

SpecificationStatusComment
SIMDThe definition of 'SIMDConstructor.fromTIMD' in that specification.DraftInitial definition.

浏览器兼容性

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic supportNo supportNightly buildNo supportNo supportNo support

FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic supportNo supportNo supportNightly buildNo supportNo supportNo support