final neg`
This commit is contained in:
parent
5ae6675cba
commit
e8df22d5c8
1 changed files with 1 additions and 1 deletions
2
app.rb
2
app.rb
|
@ -70,7 +70,7 @@ def readable_number(value)
|
||||||
negative = false
|
negative = false
|
||||||
|
|
||||||
negative = true if value.to_f < 0
|
negative = true if value.to_f < 0
|
||||||
value = value * -1
|
value = value * -1 if value < 0
|
||||||
numbers.each do |number, symbol|
|
numbers.each do |number, symbol|
|
||||||
if value.to_f / number.to_f > 1
|
if value.to_f / number.to_f > 1
|
||||||
return sprintf('%.2f', value.to_f / number.to_f) + '<strong>' + symbol + '</strong>'
|
return sprintf('%.2f', value.to_f / number.to_f) + '<strong>' + symbol + '</strong>'
|
||||||
|
|
Loading…
Reference in a new issue