Method: Geocoder::Calculations#earth_radius
- Defined in:
- lib/geocoder/calculations.rb
#earth_radius(units = nil) ⇒ Object
Radius of the Earth in the given units (:mi or :km). Use Geocoder.configure(:units => …) to configure default units.
355 356 357 |
# File 'lib/geocoder/calculations.rb', line 355 def earth_radius(units = nil) EARTH_RADII[units || Geocoder.config.units] end |