geo_monitor 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geo_monitor/lat_lng_point.rb +3 -3
- data/lib/geo_monitor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43994f4cbee81397c36751fab270df59068485f1
|
4
|
+
data.tar.gz: dd6ad8de859f8eaa10b5cc4706149bdb396fd3d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad3cf6999c6f9d336ce4b3cb576beb7ab27d47c21d1a717e0f7f2609cd980044383e3aa7b75c09ca6cd5c2566d3d19ad454b0046983398463ec513eb853a07d2
|
7
|
+
data.tar.gz: 71bf5bd362175b4bd5025e662cc7cd4773663411b94376f7b176ffe7cdba9924cbf675371f49d40aa07a69f6c220b3914375f11dc00f13b70489408c08414703
|
@@ -12,10 +12,10 @@ module GeoMonitor
|
|
12
12
|
def to_3857
|
13
13
|
d = Math::PI / 180
|
14
14
|
max = 1 - 1E-15
|
15
|
-
sin = [[Math.sin(
|
15
|
+
sin = [[Math.sin(lat * d), max].min, -max].max
|
16
16
|
self.class.new(
|
17
|
-
|
18
|
-
|
17
|
+
lng: ::GeoMonitor::Constants::R * lng * d,
|
18
|
+
lat: ::GeoMonitor::Constants::R * Math.log((1 + sin) / (1 - sin)) / 2
|
19
19
|
)
|
20
20
|
end
|
21
21
|
|
data/lib/geo_monitor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geo_monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Reed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|