diff options
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/preamble.js b/src/preamble.js index 183fd0c8..88aaff77 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -644,7 +644,7 @@ Module['stringToUTF32'] = stringToUTF32; var PAGE_SIZE = 4096; function alignMemoryPage(x) { - return ((x+4095)>>12)<<12; + return (x+4095)&-4096; } var HEAP; @@ -943,6 +943,24 @@ if (!Math['toFloat32']) Math['toFloat32'] = function(x) { Math.toFloat32 = Math['toFloat32']; #endif +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_toFloat32 = Math.toFloat32; +var Math_min = Math.min; + // 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 |