pixeldistance 0.1.0 → 0.2.0

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: 6c7bd09489eec78fafefd9154d876dc4f514e798
4
- data.tar.gz: 2aee7b315752cd0399d7b0c2b83ff29e17cbfa55
3
+ metadata.gz: 08166d95c44b09cb89185348b620b7c7f33fc92a
4
+ data.tar.gz: 8a5f0149c4ff2cd005247d5f11b3f3ad271e85ae
5
5
  SHA512:
6
- metadata.gz: 8bc009c8c52d467068b9a9497eb2d92b4440594336bd8594c068cff350547038bad7723b422f8bcb7f47450968d1920cc6f49c05b24ed9e6b9db738fbeabf117
7
- data.tar.gz: f574cb7ba9adf5beb8dc8c2a781cdf65b4dd2e68cdc68225391cced4ee8bd30bb9cb16a5321499ffa46e68784404d67e6cf8bcf88ed84d8678680e5eda844727
6
+ metadata.gz: b7b1e0d835c75f04ffc1c3c5afa2433b3df170eb4fd93c9afbc01410bfc856bb4cb88ea6c11e3dfa62ec9997b60af3caa86823580fc4537e7c1bb20014ab48c4
7
+ data.tar.gz: b43c4f53459c4662078e109b3c3c12bdc5867ffe67f7db345bffcc466bcc91bc0c7644c13da6c8983628f95a58074cb5f1ae376a930e84fb0466b80f6a3d78d3
@@ -1,3 +1,3 @@
1
1
  module PixelDistance
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/pixeldistance.rb CHANGED
@@ -17,11 +17,11 @@ module PixelDistance
17
17
  end
18
18
 
19
19
  private
20
- def lon_to_x(lon)
20
+ def self.lon_to_x(lon)
21
21
  (OFFSET + RADIUS * lon * Math::PI / 180).to_i
22
22
  end
23
23
 
24
- def lat_to_y(lat)
24
+ def self.lat_to_y(lat)
25
25
  (OFFSET + RADIUS *
26
26
  Math.log((1 + Math.sin(lat * Math::PI / 180)) /
27
27
  (1 - Math.sin(lat * Math::PI / 180))) / 2)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixeldistance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Salerno