diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-03 15:16:17 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-03 15:16:17 -0800 |
commit | 8478d6aee54d6c52de16d8c58309534afbf5bf9e (patch) | |
tree | bec73fd8e0cd6888d2dfb6b9e6a1423cc2432f61 /src/simd.js | |
parent | 1a007b1631509b9d72499a8f4402294017ee04dc (diff) | |
parent | a8e26049c1a72fa6b19dac45fa2b44616f94241a (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/simd.js')
-rw-r--r-- | src/simd.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/simd.js b/src/simd.js index c7f5ff48..6e3e3675 100644 --- a/src/simd.js +++ b/src/simd.js @@ -848,8 +848,11 @@ var SIMD = (function () { * @return {float32x4} a bit-wise copy of t as a float32x4. */ bitsToFloat32x4: function(t) { - var alias = new Float32Array(t.storage_.buffer); - return new float32x4(alias[0], alias[1], alias[2], alias[3]); + var temp_storage = new Int32Array([t.storage_[0], t.storage_[1], t.storage_[2], t.storage_[3]]); + var alias = new Float32Array(temp_storage.buffer); + var fx4 = float32x4.zero(); + fx4.storage_ = alias; + return fx4; }, /** * @param {int32x4} t An instance of int32x4. |