Permalink
Browse files

Correct the constant used to 173.7178

  • Loading branch information...
1 parent 860dc2e commit 74f6cd8895b5354be925aac0ad94a6179c45f522 @Filimindji Filimindji committed Sep 23, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 glicko.js
View
@@ -139,10 +139,10 @@ for example 0.5 to half the weight when you are playing on a team of two players
var B = ln(pow(delta,2) - pow(p.rd2,2) - v);
}else{
var k = 1;
- while(f(a - (k*Math.sqrt(Math.pow(t,2)))) < 0){
+ while(f(a - (k*Math.abs(t))) < 0){
k = k+1;
}
- var B = a - k * Math.sqrt(Math.pow(t,2));
+ var B = a - k * Math.abs(t);
}
//5.3
@@ -186,7 +186,7 @@ for example 0.5 to half the weight when you are playing on a team of two players
//step 8 convert back to original scale
p.rating = p.rating2 * 173.7178 + 1500;
- p.rd = p.rd2 * 173.7171;
+ p.rd = p.rd2 * 173.7178;
out.change.rating = (p.rating - out.init.rating)*factor;
out.change.rd = (p.rd - out.init.rd)*factor;

0 comments on commit 74f6cd8

Please sign in to comment.