Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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