第98批续:面板积分按2位小数展示(消除Java浮点累加长尾99.29999...=99.3)
This commit is contained in:
@@ -257,6 +257,9 @@ function creditRealScore($db, $target) {
|
||||
$display = $real;
|
||||
if ($display < 0) $display = 0;
|
||||
if ($display > 1000) $display = 1000;
|
||||
// ★ 第98批:镜像 double 带 Java 端浮点累加残差(如 99.29999999999998 = 99.3),
|
||||
// 面板按 2 位小数展示(与游戏内显示精度一致),JSON 不再吐长尾
|
||||
$display = round($display, 2);
|
||||
return ['display' => $display, 'real' => $real];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user