Explorar o código

Lua: Add extern for required "bit" library

Justin Donaldson %!s(int64=10) %!d(string=hai) anos
pai
achega
bb4cab184c
Modificáronse 1 ficheiros con 16 adicións e 0 borrados
  1. 16 0
      std/lua/Bit.hx

+ 16 - 0
std/lua/Bit.hx

@@ -0,0 +1,16 @@
+package lua;
+/**
+  Externs for the "bit" class that is required for haxe lua
+**/
+
+@:native("_G.bit")
+extern class Bit {
+	public static function bnot(x:Float) : Float;
+	public static function band(a:Float, b:Float) : Float;
+	public static function bor(a:Float, b:Float) : Float;
+	public static function bxor(a:Float, b:Float) : Float;
+	public static function lshift(x:Float, places:Int) : Float;
+	public static function rshift(x:Float, places:Int) : Float;
+	public static function arshift(x:Float, places:Int) : Float;
+	public static function mod(numerator:Float, denominator:Float) : Float;
+}