vincenty 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +8 -0
- data/lib/core_extensions.rb +6 -2
- data/lib/vincenty.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d5bab399fe263dce0f8b331aa915144b7f8908b
|
4
|
+
data.tar.gz: 7ec4b70ae9b5282b72e584311c66a1b3fb91d557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97cb65b1bfba2c8ad34a085901811a13c6269085e89475a733ad112387a775c1ea2b2cdbcd762600ba2b6fe9cb732930b2f608374b82bc3449c495f2a5a071f1
|
7
|
+
data.tar.gz: e31456a68c097ad32bad8bd06d89db7acd3013098322327827dd47c9cd4e161dfb5dbfb0c2680eb5127038bbaf17de74302ec5ac22ac1b0a4f72151aacdc4ac5
|
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
Rob Burrowes Mon May 18 16:51:05 2015 +1200
|
2
|
+
|
3
|
+
Rob Burrowes Mon May 18 14:33:16 2015 +1200
|
4
|
+
|
5
|
+
Rob Burrowes Mon May 18 12:07:03 2015 +1200
|
6
|
+
Alter Float.round behaviour to match ruby behaviour
|
7
|
+
robertburrowes Sat Aug 23 16:14:35 2014 +1200
|
8
|
+
Rakefile comented out rubyforge_name
|
1
9
|
robertburrowes Wed Aug 13 20:36:13 2014 +1200
|
2
10
|
Change to_d to to_deg
|
3
11
|
robertburrowes Sun Jan 13 11:19:28 2013 +1300
|
data/lib/core_extensions.rb
CHANGED
@@ -47,8 +47,12 @@ class Float
|
|
47
47
|
# @return [Float] float rounded to n decimal places.
|
48
48
|
# @param [Numeric] n Optional argument n is the number of decimal places to round to.
|
49
49
|
def round(n = 0)
|
50
|
-
|
51
|
-
|
50
|
+
if n == 0
|
51
|
+
self.round0 #This is to preserve the default behaviour, which is to return a Fixnum, not a float.
|
52
|
+
else
|
53
|
+
m = 10.0**n
|
54
|
+
(self * m).round0 / m
|
55
|
+
end
|
52
56
|
end
|
53
57
|
end
|
54
58
|
|
data/lib/vincenty.rb
CHANGED
@@ -12,7 +12,7 @@ require 'coordinate.rb'
|
|
12
12
|
# Modified to incorporate corrections to formulae as found in script on http://www.movable-type.co.uk/scripts/LatLongVincenty.html
|
13
13
|
# Added my Modification of the distanceAndAngle formulae to correct the compass bearing.
|
14
14
|
class Vincenty < Coordinate
|
15
|
-
VERSION = '1.0.
|
15
|
+
VERSION = '1.0.7'
|
16
16
|
|
17
17
|
# @return [String] constant VERSION
|
18
18
|
def version
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vincenty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Burrowes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hoe-yard
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.13'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.13'
|
41
41
|
description: "* Vincenty wrote an algorithm for calculating the bearing and distance
|
42
42
|
between two coordinates on the earth\n and an algorithm for finding a second coordinate,
|
43
43
|
given a starting coordinate, bearing and destination.\n The algorithms model the
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
117
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.
|
118
|
+
rubygems_version: 2.4.5
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: "* Vincenty wrote an algorithm for calculating the bearing and distance between
|