Sha256: 28fe2194bf9ef6e8d6c1a63482d8bc77936db70aea1038054e05fd0f069514d6

Contents?: true

Size: 132 Bytes

Versions: 1

Compression:

Stored size: 132 Bytes

Contents

class Float
  def round_dp decimal_places
    multiplier = 10.0**decimal_places
    (self*multiplier).round / multiplier
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zymurgy-0.10.0 spec/patches/float.rb