All Downloads are FREE. Search and download functionalities are using the official Maven repository.

transc-rt.0.3.2.source-code.HaxePolyfills.hx Maven / Gradle / Ivy

Go to download

JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.

There is a newer version: 0.6.8
Show newest version
class HaxePolyfills {
	static public function install() {
		#if js
		untyped __js__("
			Math.imul = Math.imul || function(a, b) {
			  var ah = (a >>> 16) & 0xffff;
			  var al = a & 0xffff;
			  var bh = (b >>> 16) & 0xffff;
			  var bl = b & 0xffff;
			  // the shift by 0 fixes the sign on the high part
			  // the final |0 converts the unsigned value into a signed value
			  return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0);
			};
		");
		#end
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy