polyfills.Math.imul.raw.js Maven / Gradle / Ivy
The newest version!
// Math.imul
Math.imul = function imul(a, b) {
var
ah = (a >>> 16) & 0xffff,
al = a & 0xffff,
bh = (b >>> 16) & 0xffff,
bl = b & 0xffff;
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0);
};