Full reversion since I am drunk
This commit is contained in:
parent
e8df22d5c8
commit
f940d30c19
1 changed files with 5 additions and 5 deletions
10
app.rb
10
app.rb
|
@ -67,18 +67,18 @@ def players
|
||||||
end
|
end
|
||||||
|
|
||||||
def readable_number(value)
|
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 if value < 0
|
#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>'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
value = 0.0 unless value
|
#value = 0.0 unless value
|
||||||
value = value * -1 if negative
|
#value = value * -1 if negative
|
||||||
return sprintf('%.2f', value) + "_"
|
return sprintf('%.2f', value) + "_"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue