Flowdock
method

round_significant

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: RoundingHelper

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

round_significant(number) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/number_helper/rounding_helper.rb, line 35
        def round_significant(number)
          return 0 if number.zero?
          digits = digit_count(number)
          multiplier = 10**(digits - precision)
          (number / BigDecimal(multiplier.to_f.to_s)).round * multiplier
        end
Register or log in to add new notes.