Class: Numeric
Overview
Extend Numeric class with Math module methods.
Instance Method Summary collapse
-
#to_deg ⇒ Object
Convert self to dec.
-
#to_rad ⇒ Object
Convert self to rad.
Instance Method Details
#to_deg ⇒ Object
Convert self to dec.
41 42 43 |
# File 'lib/numeric_math.rb', line 41 def to_deg self * 180.0 / Math::PI end |
#to_rad ⇒ Object
Convert self to rad.
36 37 38 |
# File 'lib/numeric_math.rb', line 36 def to_rad self / 180.0 * Math::PI end |