Module: Graticule::RadiansAndDegrees
- Defined in:
- lib/graticule/core_ext.rb
Instance Method Summary collapse
-
#to_degrees ⇒ Object
Convert from radians to degrees.
-
#to_radians ⇒ Object
Convert from degrees to radians.
Instance Method Details
#to_degrees ⇒ Object
Convert from radians to degrees
9 10 11 |
# File 'lib/graticule/core_ext.rb', line 9 def to_degrees ( self * 360.0 ) / Math::PI / 2 end |
#to_radians ⇒ Object
Convert from degrees to radians
4 5 6 |
# File 'lib/graticule/core_ext.rb', line 4 def to_radians ( self / 360.0 ) * Math::PI * 2 end |