Round decimals to 2

This commit is contained in:
Andrew Tomaka 2015-04-23 14:50:09 -04:00
parent 35d9a0e910
commit dacc283e15

2
app.rb
View file

@ -29,7 +29,7 @@ end
def readable_number(value)
numbers.each do |number, symbol|
if value.to_f / number.to_f > 1
return (value.to_f / number.to_f).to_s + symbol
return (value.to_f / number.to_f).round(2).to_s + symbol
end
end