From 639892dad806470cf1642404649ac9b42d024914 Mon Sep 17 00:00:00 2001 From: Ewoudt Kellerman Date: Fri, 9 Jun 2017 11:28:44 +1000 Subject: [PATCH] FIX: Rating change equal, thanks to @wakeless --- lib/elo/rating.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elo/rating.rb b/lib/elo/rating.rb index 0b954b4..b1bb565 100644 --- a/lib/elo/rating.rb +++ b/lib/elo/rating.rb @@ -50,7 +50,7 @@ def expected # For more information visit # {Wikipedia}[http://en.wikipedia.org/wiki/Elo_rating_system#Mathematical_details] def change - k_factor.to_f * ( result.to_f - expected ) + (k_factor.to_f * ( result.to_f - expected )).to_i end