Sha256: 68c158c869d7c797a82f89f6b0a0809fede06b774e8e0d36a3df6510794e0405
Contents?: true
Size: 310 Bytes
Versions: 19
Compression:
Stored size: 310 Bytes
Contents
class Numeric # # +mround(digits = 0)+: round to the nearest +digit+ digits # # +mround+ will return a rounded number to the nearest digit indicated # in its argument # #:nodoc: def mround(digit = 0) mul = (10**(digit)).to_f res = (self * mul).round res / mul end end
Version data entries
19 entries across 19 versions & 1 rubygems