更新时间:2023-02-10 22:31:39
这是一个建议。从目标
范围
中的相应字段中减去测试范围
中的每个字段。取每个结果的绝对值并求它们。总赢额最小的范围
。可以使用Math.Absolute(x)
找到x的绝对值。更复杂的方法是将绝对值表示为该字段的最大可能值的百分比。
Here is a suggestion. Subtract each field in the test
Range
from the corresponding field in the targetRange
. Take the absolute value of each result and sum them. TheRange
with the smallest total wins. The absolute value of x can be found usingMath.Absolute(x)
. A more sophisticated method would be to express the absolute value as a percentage of the maximum possible value of that field.