浏览代码

修复RandUInt64的bug

tanghai 2 年之前
父节点
当前提交
88265f8ede
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Unity/Assets/Scripts/Core/Helper/RandomGenerator.cs

+ 1 - 2
Unity/Assets/Scripts/Core/Helper/RandomGenerator.cs

@@ -20,8 +20,7 @@ namespace ET
         {
         {
             int r1 = RandInt32();
             int r1 = RandInt32();
             int r2 = RandInt32();
             int r2 = RandInt32();
-            
-            return ((ulong)r1 << 32) & (ulong)r2;
+            return ((ulong)r1 << 32) | (uint)r2;
         }
         }
 
 
         public static int RandInt32()
         public static int RandInt32()