Class: Float
Instance Method Summary collapse
- #round_with_task_tempest(precision = nil) ⇒ Object (also: #round)
Instance Method Details
#round_with_task_tempest(precision = nil) ⇒ Object Also known as: round
32 33 34 |
# File 'lib/task_tempest/active_support.rb', line 32 def round_with_task_tempest(precision = nil) precision.nil? ? round_without_task_tempest : (self * (10 ** precision)).round / (10 ** precision).to_f end |