参数优化
This commit is contained in:
@@ -326,8 +326,7 @@ const calcNormalBowTarget = (x, y, diameter) => {
|
||||
// 计算相对距离(0-1之间)
|
||||
let relativeDistance = distance / targetRadius;
|
||||
|
||||
relativeDistance -= 0.005;
|
||||
|
||||
relativeDistance += 0.005;
|
||||
// 全环靶有10个环,每个环占半径的10%
|
||||
// 从外到内:1环到10环
|
||||
// 距离越近靶心,环数越高
|
||||
@@ -370,13 +369,12 @@ const calcHalfBowTarget = (x, y, diameter, noX = false) => {
|
||||
|
||||
// 计算相对距离(0-1之间)
|
||||
let relativeDistance = distance / targetRadius;
|
||||
relativeDistance -= 0.004;
|
||||
if (relativeDistance <= 0.1) return noX ? 10 : "X";
|
||||
if (relativeDistance <= 0.2) return noX ? 9 : 10;
|
||||
if (relativeDistance <= 0.4) return 9;
|
||||
if (relativeDistance <= 0.6) return 8;
|
||||
if (relativeDistance <= 0.8) return 7;
|
||||
if (relativeDistance <= 1.0) return 6;
|
||||
if (relativeDistance <= 0.992) return 6;
|
||||
|
||||
return 0; // 脱靶
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user