module RbBCC::DisplayHelper

They're directly ported from table.py They might be more looked like Ruby code

Public Instance Methods

print_linear_hist(vals, val_type) click to toggle source
print_log2_hist(vals, val_type, strip_leading_zero) click to toggle source
stars(val, val_max, width) click to toggle source
# File lib/rbbcc/disp_helper.rb, line 10
def stars(val, val_max, width)
  i = 0
  text = ""
  while true
    break if (i > (width * val.to_f / val_max) - 1) || (i > width - 1)
    text += "*"
    i += 1
  end
  if val > val_max
    text = text[0...-1] + "+"
  end
  return text
end