Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_com/core/numeric.rb

Instance Method Summary collapse

Instance Method Details

#half_floorObject



7
8
9
# File 'lib/rails_com/core/numeric.rb', line 7

def half_floor
  (self * 2).floor / 2.0
end

#half_roundObject



3
4
5
# File 'lib/rails_com/core/numeric.rb', line 3

def half_round
  (self * 2).round / 2.0
end