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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0dee5fad19eb247218be04745c1d5796bc1131c
4
- data.tar.gz: 96b4c55bfc9e97bddd0487609d2742c16ed3b3fb
3
+ metadata.gz: 43994f4cbee81397c36751fab270df59068485f1
4
+ data.tar.gz: dd6ad8de859f8eaa10b5cc4706149bdb396fd3d7
5
5
  SHA512:
6
- metadata.gz: 5907cefc468dea339132b359c2618fcfdf908da0dbcb7f89415be76bafa14c75a327e2d0cfa16cf8ecdb670b052bc7025d7909ba1d1a7b0ce0158b874261206a
7
- data.tar.gz: e30e44e79232cd1655a588ed660b13c8b7bc5c89de37d0514f7dacd28629cb7e0c22b3849756e40fe1ca512872659ba79a2e29ae27d2af9ac45b0a436c7018b1
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(lng * d), max].min, -max].max
15
+ sin = [[Math.sin(lat * d), max].min, -max].max
16
16
  self.class.new(
17
- lat: ::GeoMonitor::Constants::R * lat * d,
18
- lng: ::GeoMonitor::Constants::R * Math.log((1 + sin) / (1 - sin)) / 2
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
 
@@ -1,3 +1,3 @@
1
1
  module GeoMonitor
2
- VERSION = '0.3.3'
2
+ VERSION = '0.4.0'
3
3
  end
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.3.3
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-17 00:00:00.000000000 Z
11
+ date: 2018-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails