class Util

Public Class Methods

cm_to_px(cm) click to toggle source
# File lib/util.rb, line 2
def Util.cm_to_px(cm)
  return cm / 2.5 * 72
end
is_number?(object) click to toggle source
# File lib/util.rb, line 10
def Util.is_number?(object)
  true if Float(object) rescue false
end
number_format(number) click to toggle source
# File lib/util.rb, line 14
def Util.number_format(number)
  '%.2f' % number.to_f
end
trans_y(off, y) click to toggle source
# File lib/util.rb, line 6
def Util.trans_y(off, y)
  720 - off - y
end