Sha256: 9f6e4cfe7e459a2050f2895074f1e75c4bf391d53cd811e0d218f477d432f249
Contents?: true
Size: 490 Bytes
Versions: 1
Compression:
Stored size: 490 Bytes
Contents
require 'spec_helper' describe "GeoDistance::Haversine" do it "should work" do lon1 = -104.88544 lat1 = 39.06546 lon2 = -104.80 lat2 = lat1 dist = GeoDistance::Haversine.distance( lat1, lon1, lat2, lon2 ) puts "the distance from #{lat1}, #{lon1} to #{lat2}, #{lon2} is: #{dist[:meters].number} meters" puts "#{dist[:feet]}" puts "#{dist.meters}" puts "#{dist[:km]}" puts "#{dist[:miles]}" dist[:km].to_s.should match(/7\.376*/) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geo-distance-0.1.2 | spec/dist_haversine_spec.rb |