revert
This commit is contained in:
parent
69a1f2b5a8
commit
e78792d435
1 changed files with 7 additions and 7 deletions
14
app.rb
14
app.rb
|
@ -67,16 +67,16 @@ def players
|
|||
end
|
||||
|
||||
def readable_number(value)
|
||||
if value.to_f < 0
|
||||
negative = true
|
||||
value *= -1 if value < 0
|
||||
else
|
||||
negative = false
|
||||
end
|
||||
#if value.to_f < 0
|
||||
# negative = true
|
||||
# value *= -1 if value < 0
|
||||
#else
|
||||
# negative = false
|
||||
#end
|
||||
|
||||
numbers.each do |number, symbol|
|
||||
if value.to_f / number.to_f > 1
|
||||
new_value = '-' if negative
|
||||
#new_value = '-' if negative
|
||||
new_value += sprintf('%.2f', value.to_f / number.to_f) + '<strong>' + symbol + '</strong>'
|
||||
return new_value
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue