From 769fd4b7cd3129f72cd77381cfe23ab7572fa20c Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 10 May 2024 19:58:29 +0800 Subject: [PATCH] aaaa --- ica-rs/plugins/md5/md5-api.js | 4 ++-- ica-rs/plugins/md5/md5-api.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ica-rs/plugins/md5/md5-api.js b/ica-rs/plugins/md5/md5-api.js index cc42f55..bdd2f75 100644 --- a/ica-rs/plugins/md5/md5-api.js +++ b/ica-rs/plugins/md5/md5-api.js @@ -164,7 +164,7 @@ function wrap_any(names, round) { return [2 /*return*/, "\u8D62\u5BB6:|".concat(result.source_plr, "|")]; } else if ('win_count' in result) { - win_rate_1 = result.win_count / round; + win_rate_1 = result.win_count * 100 / round; win_rate_str = win_rate_1.toFixed(4); output_str_1 = "\u6700\u7EC8\u80DC\u7387:|".concat(win_rate_str, "|(").concat(round, "\u8F6E)"); // 每 500 轮, 输出一次 @@ -176,7 +176,7 @@ function wrap_any(names, round) { } }); output_datas_1.forEach(function (data, index) { - var win_rate = data.win_count / data.round; + var win_rate = data.win_count * 100 / data.round; output_str_1 += "\n".concat(win_rate.toFixed(2), "%(").concat(data.round, ")"); }); } diff --git a/ica-rs/plugins/md5/md5-api.ts b/ica-rs/plugins/md5/md5-api.ts index d77704a..a1cd785 100644 --- a/ica-rs/plugins/md5/md5-api.ts +++ b/ica-rs/plugins/md5/md5-api.ts @@ -146,7 +146,7 @@ async function wrap_any(names: string, round: number): Promise { return `赢家:|${result.source_plr}|`; } else if ('win_count' in result) { // 胜率结果 - const win_rate = result.win_count / round; + const win_rate = result.win_count * 100 / round; let win_rate_str = win_rate.toFixed(4); let output_str = `最终胜率:|${win_rate_str}|(${round}轮)`; // 每 500 轮, 输出一次 @@ -159,7 +159,7 @@ async function wrap_any(names: string, round: number): Promise { } }); output_datas.forEach((data, index) => { - const win_rate = data.win_count / data.round; + const win_rate = data.win_count * 100 / data.round; output_str += `\n${win_rate.toFixed(2)}%(${data.round})`; }); }