From 4c677e360440273429bef196fd09269c71067f35 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Mon, 2 Jan 2023 08:34:41 -0700 Subject: [PATCH] Fix < instead of <= bug in glicko2 implementation Fixes #40 --- goratings/math/glicko2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goratings/math/glicko2.py b/goratings/math/glicko2.py index b28f215..ecbd3e3 100644 --- a/goratings/math/glicko2.py +++ b/goratings/math/glicko2.py @@ -133,7 +133,7 @@ def f(x: float) -> float: while abs(B - A) > EPSILON and safety > 0: C = A + (A - B) * fA / (fB - fA) fC = f(C) - if fC * fB < 0: + if fC * fB <= 0: A = B fA = fB else: