module Helper

Public Instance Methods

round(float, precision = 2) click to toggle source

Rounds float with given precision.

# File lib/vidibus/sysinfo/helper.rb, line 3
def round(float, precision = 2)
  m = 10**precision
  (float.to_f*m).round.to_f/m
end