Skip to content

Commit

Permalink
require haversine >= 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mamantoha committed Apr 3, 2024
1 parent b995a70 commit 71ea2a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ crystal: ">= 1.0.0"
dependencies:
haversine:
github: geocrystal/haversine
version: ">= 0.4.0"
convex_hull:
github: geocrystal/convex_hull
version: ">= 0.6.0"
Expand Down
2 changes: 1 addition & 1 deletion spec/geo/distance_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe Geo::Coord do
context "distance" do
context "calculates distance (by haversine formula)" do
it { london.distance(london).to_kilometers.should eq(0) }
it { new_york.distance(london).to_kilometers.should eq(5570.4744596620685) }
it { new_york.distance(london).to_kilometers.should eq(5570.482153929098) }
end
end
end

0 comments on commit 71ea2a2

Please sign in to comment.