Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google rank levels #89

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DeinFreund
Copy link
Collaborator

@@ -29,7 +29,7 @@ module.exports = React.createClass({

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
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
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
Member

Say no to drugs, use a switch goddamnit.

@DeinFreund
Copy link
Collaborator Author

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

@db81
Copy link
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