Formatting numbers in ruby
Just for my own reference, this is how you format numbers in Ruby:
1 |
puts "%.2f (float), %d (decimal)" % [1.23456, 5] |
Just for my own reference, this is how you format numbers in Ruby:
1 |
puts "%.2f (float), %d (decimal)" % [1.23456, 5] |