Fixed a bug in the tolerance calculation.

This commit is contained in:
2020-05-02 01:05:46 -05:00
parent babbdc20af
commit fe30f0c6ba
+1 -1
View File
@@ -173,7 +173,7 @@ for r in res:
t = tokenizer.replace_variables(tokens, list(r))
#tokenizer.print_token_list(t)
result = calc_engine.calculate_results(t)
if result <= int(exp.wrong_response(1 + tolerance)) and result >= int(exp.wrong_response(1 - tolerance)):
if result <= int(exp.wrong_response * (1 + tolerance)) and result >= int(exp.wrong_response * (1 - tolerance)):
if not result in answers:
answers[result] = t
#if result <= tol and result >= int(exp.wrong_response - exp.wrong_response * tolerance):