Files
grecia/lib/numeric.rb
2019-09-10 20:02:15 +02:00

6 lines
70 B
Ruby

class Numeric
def percent_of(n)
(to_f / n * 100).to_i
end
end