Skip to content

Commit

Permalink
Merge pull request #12 from winglang/missing-paren
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriscbr authored Aug 11, 2023
2 parents f89da30 + 889ac94 commit ca82035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.w
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Store {
let loserScore = this.getEntry(loser).score;

// probability that the winner should have won
let pWinner = 1.0 / (1.0 + 10 ** (loserScore - winnerScore) / 400.0);
let pWinner = 1.0 / (1.0 + 10 ** ((loserScore - winnerScore) / 400.0));

let winnerNewScore = Util.clamp(winnerScore + 32 * (1.0 - pWinner), 1000, 2000);
let loserNewScore = Util.clamp(loserScore + 32 * (pWinner - 1.0), 1000, 2000);
Expand Down
2 changes: 1 addition & 1 deletion website/src/views/VotingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const VotingView = () => {
disabled={loading || loadingScores}
loading={loadingScores && selectedWinnerIdx === index}
winner={winner}
score={scores[index]}
score={Math.floor(scores[index])}
/>
</div>
))}
Expand Down

0 comments on commit ca82035

Please sign in to comment.