Created
November 1, 2008 11:31
-
-
Save ukstudio/21510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DartsLive | |
def self.rating(zero_one_stats, cricket_stats) | |
((0.2 * zero_one_stats - 6) + (5.0 * cricket_stats - 4.5)) / 2 | |
end | |
module NumericExtension | |
def need_stats | |
{:zero_one => (self + 6) / 0.2, :cricket => (self + 4.5) / 5} | |
end | |
end | |
end | |
class Numeric | |
include DartsLive::NumericExtension | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment