Remove clutter

This commit is contained in:
schmelczerandras 2020-11-18 21:17:55 +01:00
parent df959ad304
commit 0fa1f48754
3 changed files with 0 additions and 22 deletions

View file

@ -1,5 +0,0 @@
node_modules
dist
target
package-lock.json
.*

View file

@ -1,17 +0,0 @@
export const polyfillImul = () => {
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
if (!Math.imul)
Math.imul = function(opA, opB) {
opB |= 0; // ensure that opB is an integer. opA will automatically be coerced.
// floating points give us 53 bits of precision to work with plus 1 sign bit
// automatically handled for our convenience:
// 1. 0x003fffff /*opA & 0x000fffff*/ * 0x7fffffff /*opB*/ = 0x1fffff7fc00001
// 0x1fffff7fc00001 < Number.MAX_SAFE_INTEGER /*0x1fffffffffffff*/
let result = (opA & 0x003fffff) * opB;
// 2. We can remove an integer coercion from the statement above because:
// 0x1fffff7fc00001 + 0xffc00000 = 0x1fffffff800001
// 0x1fffffff800001 < Number.MAX_SAFE_INTEGER /*0x1fffffffffffff*/
if (opA & 0xffc00000 /*!== 0*/) result += ((opA & 0xffc00000) * opB) | 0;
return result | 0;
};
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB