From: Steinar H. Gunderson Date: Wed, 3 Oct 2007 20:03:55 +0000 (+0200) Subject: Remove superfluous stuff. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5d8e7760de40b71f334b1f9c2302767750a39b8e;hp=3298937aa329fbeefb64080636bc7873461e75c3;p=foosball Remove superfluous stuff. --- diff --git a/www/add-single-result.pl b/www/add-single-result.pl index 78a989e..0037020 100755 --- a/www/add-single-result.pl +++ b/www/add-single-result.pl @@ -40,10 +40,6 @@ my $q = $foosball::q; my ($newr1, $newrd1) = foosball::calc_rating($rating1, $rd1, $rating2, $rd2, $score1, $score2); my ($newr2, $newrd2) = foosball::calc_rating($rating2, $rd2, $rating1, $rd1, $score2, $score1); -my $d2sq = foosball::dsq($rating2, $rating1, $rd1); -my $newr2 = $rating2 + ($q / (1.0/($rd2*$rd2) + 1.0 / $d2sq)) * foosball::g($rd1) * ($s2 - foosball::E($rating2, $rating1, $rd1)); -my $newrd2 = sqrt(1.0 / (1.0 / ($rd2*$rd2) + 1.0 / $d2sq)); - $dbh->do('INSERT INTO single_results (gametime,username1,username2,score1,score2) VALUES (CURRENT_TIMESTAMP,?,?,?,?)', undef, $username1, $username2, $score1, $score2); $dbh->do('INSERT INTO single_rating (username,ratetime,rating,rd) VALUES (?,CURRENT_TIMESTAMP,?,?)',