module Geocoder::Calculations
def to_degrees(*args)
converts each value and returns array.
If an array (or multiple arguments) is passed,
Convert radians to degrees.
#
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