Browse Source

Lua: Add extern for required "bit" library

Justin Donaldson 10 years ago
parent
commit
bb4cab184c
1 changed files with 16 additions and 0 deletions
  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;
+}