Skip to content

Instantly share code, notes, and snippets.

@petyosi
Forked from anonymous/gist:44797
Created January 8, 2009 17:25
Show Gist options
  • Save petyosi/44804 to your computer and use it in GitHub Desktop.
Save petyosi/44804 to your computer and use it in GitHub Desktop.
win_coef = self.win(profile, scope).to_f/100
avg_win_coef = self.average(profile, scope, :wins)
avg_lose_coef = self.average(profile, scope, :losses)
(win_coef * avg_win_coef) + ((100 - win_coef) * (-avg_lose_coef)).to_i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment