Skip to content

google rank levels#89

Open
DeinFreund wants to merge 2 commits intospringweblobby:masterfrom
DeinFreund:adjustRanks
Open

google rank levels#89
DeinFreund wants to merge 2 commits intospringweblobby:masterfrom
DeinFreund:adjustRanks

Conversation

@DeinFreund
Copy link
Copy Markdown
Collaborator

Comment thread comp/ConnectButton.jsx
var user = this.state.users[this.state.nick];
if (user.elo > 0 && user.level >= 0){ //zkls
var level = Math.max(0, Math.min(7, Math.floor(Math.log(user.level / 30 + 1) * 4.2)));
var level = Math.max(0, Math.min(7, Math.floor((-0.12/this.cosh((user.level-61.9)/7.08)+1)*2.93*Math.log(Math.exp(-2.31)*user.level+1)-0.89/this.cosh((user.level-28.55)/3.4))));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dein_formula

Jesus Christ.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#Brackman

@Anarchid
Copy link
Copy Markdown
Member

Say no to drugs, use a switch goddamnit.

@DeinFreund
Copy link
Copy Markdown
Collaborator Author

Switch is so long and has so many jump instructions, not nice.

@db81
Copy link
Copy Markdown
Member

db81 commented Sep 13, 2016

This is a work of art for sure, but

var level = _.findIndex([0, 5, 10, 20, 35, 50, 75, 100, Infinity], (x) => (x > user.level)) - 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants