From e7dc944e1cc77f3ec053255b83d2bcd772fdcf83 Mon Sep 17 00:00:00 2001 From: Lveyou <1339484752@qq.com> Date: Mon, 24 Nov 2025 21:21:53 +0800 Subject: [PATCH] 1 --- dl/math/dl_random.h | 7 +++++++ project/copy_res.bat | 1 + project/hs | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dl/math/dl_random.h b/dl/math/dl_random.h index 3a4e4042..75461bd0 100644 --- a/dl/math/dl_random.h +++ b/dl/math/dl_random.h @@ -162,6 +162,13 @@ public: { return { Uint(p0[0], p1[0]), Uint(p0[1], p1[1]) }; } + /** + * @brief 返回百分比命中 + */ + static bool Percent(int v) + { + return Int(0, 99) < 50; + } //! 一般不使用,传给标准库接口才使用 static std::default_random_engine& GetEngine() diff --git a/project/copy_res.bat b/project/copy_res.bat index 873d4d89..02e8fad2 100644 --- a/project/copy_res.bat +++ b/project/copy_res.bat @@ -4,6 +4,7 @@ set "PATH_OUT=%2%" set "PATH_RES=%PATH_RES:/=\%" set "PATH_OUT=%PATH_OUT:/=\%" +echo 进行资源软链接,失败请以管理员模式启动ide mklink /d %PATH_OUT% %PATH_RES% ::xcopy %PATH_RES% %PATH_OUT% /e /i /y \ No newline at end of file diff --git a/project/hs b/project/hs index 8eb84eb5..266c7faf 160000 --- a/project/hs +++ b/project/hs @@ -1 +1 @@ -Subproject commit 8eb84eb58d6186082c41d68f5dd590a692311f4e +Subproject commit 266c7faf785a252121e8672117c3fd442a7b6e55