Method: Geocoder::Calculations#to_degrees

Defined in:
lib/geocoder/calculations.rb

#to_degrees(*args) ⇒ Object

Convert radians to degrees. If an array (or multiple arguments) is passed, converts each value and returns array.



310
311
312
313
314
315
316
317
# File 'lib/geocoder/calculations.rb', line 310

def to_degrees(*args)
  args = args.first if args.first.is_a?(Array)
  if args.size == 1
    (args.first * 180.0) / Math::PI
  else
    args.map{ |i| to_degrees(i) }
  end
end