Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/rrobots/numeric.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/rrobots/numeric.rb', line 7

def to_deg
  self * TO_DEG
end

#to_radObject



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

def to_rad
  self * TO_RAD
end