aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-11 21:57:15 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-11 21:57:15 -0700
commit8cb83003709aa90a3410b6352552342ec97d5116 (patch)
tree1b8cb216f7f9bc3b2bba5799e1d8261b28b6513b /src/preamble.js
parent5bb74d2c5ed57a7b52e1a3d01404edfb7a9945ea (diff)
experimental toFloat32 option
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 95bf2dc2..0f3f52c9 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -853,6 +853,13 @@ Math['imul'] = function(a, b) {
#endif
Math.imul = Math['imul'];
+#if TO_FLOAT32
+if (!Math['toFloat32']) Math['toFloat32'] = function(x) {
+ return x;
+};
+Math.toFloat32 = Math['toFloat32'];
+#endif
+
// A counter of dependencies for calling run(). If we need to
// do asynchronous work before running, increment this and
// decrement it. Incrementing must happen in a place like