method
round_without_significant
v6.0.0 -
Show latest stable
- Class:
ActiveSupport::NumberHelper::RoundingHelper
round_without_significant(number)private
No documentation available.
# File activesupport/lib/active_support/number_helper/rounding_helper.rb, line 28
def round_without_significant(number)
number = number.round(precision)
number = number.to_i if precision == 0 && number.finite?
number = number.abs if number.zero? # prevent showing negative zeros
number
end