Skip to content

Commit

Permalink
test: support to generate calculated distance from 4th quadrant to 2n…
Browse files Browse the repository at this point in the history
…d one
  • Loading branch information
kenhys committed Nov 6, 2012
1 parent 10c9cd0 commit f82c2c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/command/tools/geo/generate-grntest-data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def geo_distance(app_type)
@latitude_end.to_i)
end
(north_distance + south_distance).floor
when "1st_to_3rd", "3rd_to_1st", "2nd_to_4th"
when "1st_to_3rd", "3rd_to_1st", "2nd_to_4th", "4th_to_2nd"
longitude_delta = @longitude_end_degree - @longitude_start_degree
latitude_delta = @latitude_end_degree - @latitude_start_degree
slope = latitude_delta / longitude_delta.to_f
Expand Down Expand Up @@ -790,7 +790,7 @@ def geo_distance(app_type)
third_latitude)
(first_distance + third_distance).floor
end
when "2nd_to_4th"
when "2nd_to_4th", "4th_to_2nd"
if @longitude_start_degree > @longitude_end_degree
rounded_longitude_degree = @longitude_end_degree + 360
rounded_latitude_degree = @latitude_end_degree
Expand Down

0 comments on commit f82c2c3

Please sign in to comment.