Skip to content
Snippets Groups Projects
Commit 686e5ba1 authored by Alex Reisner's avatar Alex Reisner
Browse files

Revert "Include Math module."

This reverts commit fc0b5ba9.
parent 9d9208f2
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# Add geocoding functionality (via Google) to any object. # Add geocoding functionality (via Google) to any object.
# #
module Geocoder module Geocoder
include Math
## ##
# Implementation of 'included' hook method. # Implementation of 'included' hook method.
...@@ -208,9 +207,9 @@ module Geocoder ...@@ -208,9 +207,9 @@ module Geocoder
dlat = (lat1 - lat2).abs dlat = (lat1 - lat2).abs
dlon = (lon1 - lon2).abs dlon = (lon1 - lon2).abs
a = (sin(dlat / 2))**2 + cos(lat1) * a = (Math.sin(dlat / 2))**2 + Math.cos(lat1) *
(sin(dlon / 2))**2 * cos(lat2) (Math.sin(dlon / 2))**2 * Math.cos(lat2)
c = 2 * atan2( sqrt(a), sqrt(1-a)) c = 2 * Math.atan2( Math.sqrt(a), Math.sqrt(1-a))
c * units[options[:units]] c * units[options[:units]]
end end
...@@ -246,7 +245,7 @@ module Geocoder ...@@ -246,7 +245,7 @@ module Geocoder
# Convert degrees to radians. # Convert degrees to radians.
# #
def self.to_radians(degrees) def self.to_radians(degrees)
degrees * (PI / 180) degrees * (Math::PI / 180)
end end
## ##
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment