Class: Numeric

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

Constant Summary collapse

TO_RAD =
Math::PI / 180.0
TO_DEG =
180.0 / Math::PI

Instance Method Summary collapse

Instance Method Details

#to_degObject



7
8
9
# File 'lib/overloads.rb', line 7

def to_deg
  self * TO_DEG
end

#to_radObject



4
5
6
# File 'lib/overloads.rb', line 4

def to_rad
  self * TO_RAD
end