From: Ant Zucaro Date: Mon, 24 Apr 2017 23:43:48 +0000 (-0400) Subject: Ensure floats. X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=d14598991bc27e7d3aceefab37ce7ec3a46a1b76;hp=ec7b09190ffc16b0d7b0d55947a91fc31a42bde1;p=xonotic%2Fxonstat.git Ensure floats. --- diff --git a/xonstat/elo.py b/xonstat/elo.py index 536f16e..0e00407 100644 --- a/xonstat/elo.py +++ b/xonstat/elo.py @@ -221,7 +221,7 @@ class EloProcessor: # adjust the elo prediction according to ping ping_ratio = self.pingfactor(pi, pj) scorefactor_ping = ep.latency_trend_factor * (0.5 - ping_ratio) - scorefactor_elo_adjusted = max(0, min(1, scorefactor_elo + scorefactor_ping)) + scorefactor_elo_adjusted = max(0.0, min(1.0, scorefactor_elo + scorefactor_ping)) # initial adjustment values, which we may modify with additional rules adjustmenti = scorefactor_real - scorefactor_elo_adjusted