cacheable_kdtree 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODNiNGI4ZTY3NmQ2ZDNkZTNlYTlmNzBlY2Y2ZWE5ZjI4ZmIzOWZiMg==
4
+ MDYxZjg3YzE2MmMwMzQ1ZWY3YzFmNGRiYmY4ODczNmM5OGRmNTk1MQ==
5
5
  data.tar.gz: !binary |-
6
- M2JhZGZkODZiYzMwZDk2ZjVlMDNhMmIxYzFhMzc3Yzc3MjBhNmMwYg==
6
+ YzIxYWM3ZmVmODM1ZThjNGNjZTNhMzFlMGFhODgyZWM5NTVmZjVlNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTllMDlkYzJiNjU4NzNjNzQxMzNiMWU0ZmQxZDQ3YzYwMWU1MzMwNzAyMDlk
10
- YmU0YmVlODE2YTJhODc3Y2RlYzAxOTk3NDNkY2Q2YWZjMjhmOTk1NTQxZjcz
11
- NjM1NDFiOTE5NmEzNmQ4ZDczMDJkOWRmNzRlZmNkYzlmODU4YTA=
9
+ YWU3NDdjZGY1NDFlNTM4OGFjM2JkODFkZmFhODZjNTVkODY5ZWFlNzIxNjVh
10
+ Nzg4ZTYxMjUwMjBmZDJhYTYwNDgwNzU0ZDk3MDI3YThkOTdmYzFjYmYyMWUz
11
+ NzkxYTRhMzY2MTFlZTBiNTYzNzQwY2NkN2E0YjllNzJiZjZlODI=
12
12
  data.tar.gz: !binary |-
13
- YTFmOTAxNTc0NjQyNDYyZjUxOTk1ZGM2MmFhZTNhNDVhYzlkYmU3ODEyODEz
14
- ZmQ3YzVkMWRhMmE2OWM0YmY5MGZhNmM5MzJmMWRlOWU1ODc1MTJkMGU4MTJm
15
- NThhMzI5Y2JkNWE5Zjg3MDMzYTdkNzc2NzEyNzhkMmY0YWZjMzU=
13
+ MzUzNDJjZjQxOTEyOTJlNmVkOTg0NmM0ZjEwOGEzNmM2M2IwOTY3MWIzMTFk
14
+ YThiODJiNjg0MzU4NDJmNDQzOWMxMTZiMzlmNGQzNWMyZjAyNTdmMzAwY2Ri
15
+ M2NhZDg3ODVjYTcyM2MwNTdkNTIwNGZjMTBiZDEyODJhYTJjMDY=
@@ -33,10 +33,10 @@ class CacheableKdtree::Util
33
33
 
34
34
  # I am using the law of cosines because it is faster than Haversine...
35
35
  def self.distance_law_of_cosines(p1_lat, p1_long, p2_lat, p2_long, sphere_radius)
36
- p1_lat = degrees_to_radians(p1_lat)
37
- p1_long = degrees_to_radians(p1_long)
38
- p2_lat = degrees_to_radians(p2_lat)
39
- p2_long = degrees_to_radians(p2_long)
36
+ p1_lat = degrees_to_radians(p1_lat.to_f)
37
+ p1_long = degrees_to_radians(p1_long.to_f)
38
+ p2_lat = degrees_to_radians(p2_lat.to_f)
39
+ p2_long = degrees_to_radians(p2_long.to_f)
40
40
  Math.acos(Math.sin(p1_lat) * Math.sin(p2_lat) +
41
41
  Math.cos(p1_lat) * Math.cos(p2_lat) * Math.cos(p2_long - p1_long)) * sphere_radius
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module CacheableKdtree
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cacheable_kdtree
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Franssell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-23 00:00:00.000000000 Z
11
+ date: 2016-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler