Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/numeric_extensions.rb

Instance Method Summary collapse

Instance Method Details

#degreesObject



2
3
4
# File 'lib/numeric_extensions.rb', line 2

def degrees
  self * Math::PI / 180
end

#radiansObject



5
6
7
# File 'lib/numeric_extensions.rb', line 5

def radians
  self * 180 / Math::PI
end