Sha256: bb1e29f82eae73deb11753899b12d6f14485595d4b11a9cea5d33a46e352cbe4
Contents?: true
Size: 425 Bytes
Versions: 16
Compression:
Stored size: 425 Bytes
Contents
module MoreCoreExtensions module NumericRounding def round_up(nearest = 1) return self if nearest == 0 return self if (self % nearest) == 0 self + nearest - (self % nearest) end def round_down(nearest = 1) return self if nearest == 0 return self if (self % nearest) == 0 self - (self % nearest) end end end Numeric.send(:prepend, MoreCoreExtensions::NumericRounding)
Version data entries
16 entries across 16 versions & 1 rubygems