Class: Float

Inherits:
Object show all
Defined in:
lib/task_tempest/active_support.rb

Instance Method Summary collapse

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