Flowdock
method

calculate_exponent

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: NumberToHumanConverter
calculate_exponent(units) 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/number_to_human_converter.rb, line 47
        def calculate_exponent(units)
          exponent = number != 0 ? Math.log10(number.abs).floor : 0
          unit_exponents(units).find { |e| exponent >= e } || 0
        end
Register or log in to add new notes.