geo_monitor 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab151f6a639c1f3b4359ace4fb8318fcdc66dac5
4
- data.tar.gz: 48b9226547651a2676467158695986c044597863
3
+ metadata.gz: 8aa59e208f3d1d09a9756f3c478478fc5aa21bd2
4
+ data.tar.gz: 65df4b3d90e6c9df548f7ea539ffbd092e5c8704
5
5
  SHA512:
6
- metadata.gz: c2c4540c22beb12877d6d9ecafdbcc77bf000cc1e9263fa2a9fc3978df67470239dbd952680812ef34f76f231d1a38a9599be61bc36cf7e8e41660177747c564
7
- data.tar.gz: 4d9ccfd4a1996e7d10f4d7cfb5dcbf349f4126658632a229a8d144e681b1d6635ff4022efb252617b0b3c25d7ec5a0b9e1b49540be76ff41989a59c61450799f
6
+ metadata.gz: 1034ba899f4974e949b2e027e55b070fff277d655e64010130832e5bb08e534880ed17e951391a64e41768ea2f7d358ee8eb53222a60b2b0f00dd34623897ae3
7
+ data.tar.gz: 3da4e76a03b327e3cc795954f636a28e194338dd639f58f95fab088081431958ce98d77ef44e2aa61823d54d0639a1eac02281f2feab038c62c8dfb28f2ace64
@@ -38,10 +38,10 @@ module GeoMonitor
38
38
  lng_diff = east - west
39
39
  max_diff = [lat_diff, lng_diff].max
40
40
 
41
- if max_diff < GeoMonitor::DEGREES_IN_CIRCLE / 2**20
41
+ if max_diff < ::GeoMonitor::DEGREES_IN_CIRCLE / 2**20
42
42
  zoom = 21
43
43
  else
44
- zoom = -1 * ((Math.log(max_diff) / Math.log(2)) - (Math.log(GeoMonitor::DEGREES_IN_CIRCLE) / Math.log(2)))
44
+ zoom = -1 * ((Math.log(max_diff) / Math.log(2)) - (Math.log(::GeoMonitor::DEGREES_IN_CIRCLE) / Math.log(2)))
45
45
  zoom = 1 if zoom < 1
46
46
  end
47
47
  zoom.ceil
@@ -52,7 +52,7 @@ module GeoMonitor
52
52
  def tile_number
53
53
  lat_rad = south / 180 * Math::PI
54
54
  n = 2.0**zoom_level
55
- x = ((west + 180.0) / GeoMonitor::DEGREES_IN_CIRCLE * n).to_i
55
+ x = ((west + 180.0) / ::GeoMonitor::DEGREES_IN_CIRCLE * n).to_i
56
56
  y = ((1.0 - Math.log(Math.tan(lat_rad) + (1 / Math.cos(lat_rad))) / Math::PI) / 2.0 * n)
57
57
  y = if y.infinite?.nil?
58
58
  y.to_i
@@ -1,3 +1,3 @@
1
1
  module GeoMonitor
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Reed