Advertisement
marvk

Untitled

Oct 11th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.17 KB | None | 0 0
  1. private double dist(Stop s) {
  2.     double x = (s.lon - this.lon) * Math.cos((this.lat+s.lat)/2);
  3.     double y = s.lat - this.lat;
  4.     return Math.sqrt(x*x+y*y) * 6371.0;
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement