2
0
Эх сурвалжийг харах

Use more bits in random numbers

Hugh Sanderson 13 жил өмнө
parent
commit
0e38d14821

+ 1 - 1
std/cpp/_std/Std.hx

@@ -45,7 +45,7 @@
 	}
 	}
 
 
 	public static function random( x : Int ) : Int {
 	public static function random( x : Int ) : Int {
-		return untyped __global__.rand() % x;
+		return untyped __global__.__hxcpp_irand(x);
 	}
 	}
 
 
 	@:macro public static function format( fmt : haxe.macro.Expr.ExprOf<String> ) : haxe.macro.Expr.ExprOf<String> {
 	@:macro public static function format( fmt : haxe.macro.Expr.ExprOf<String> ) : haxe.macro.Expr.ExprOf<String> {