소스 검색

Use more bits in random numbers

Hugh Sanderson 13 년 전
부모
커밋
0e38d14821
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/cpp/_std/Std.hx

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

@@ -45,7 +45,7 @@
 	}
 
 	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> {