Browse Source

added rand_int

Nicolas Cannasse 19 năm trước cách đây
mục cha
commit
39e438b9c4
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      std/neko/NekoMath__.hx

+ 3 - 2
std/neko/NekoMath__.hx

@@ -46,8 +46,9 @@ class NekoMath__
 	static var pow = Lib.load("std","math_pow",2);
 
 	static var _rnd = Lib.load("std","random_new",0)();
-	static var _random = Lib.load("std","random_float",1);
-	static function random() { return _random(_rnd); }
+	static var _rand_float = Lib.load("std","random_float",1);
+	static var _rand_int = Lib.load("std","random_int",2);
+	static function random() { return _rand_float(_rnd); }
 }