Module: Suture::Util::Numbers

Defined in:
lib/suture/util/numbers.rb

Class Method Summary collapse

Class Method Details

.percent(x, out_of_y) ⇒ Object



3
4
5
# File 'lib/suture/util/numbers.rb', line 3

def self.percent(x, out_of_y)
  ((x.to_f / out_of_y.to_f) * 100).round
end