diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-03-22 11:54:28 +0100 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-03-23 07:44:30 +0100 |
commit | a26aecc03b5c110ce0912f3340933a4ed87d5ec0 (patch) | |
tree | fd54656fc841298d4f8908972f8c4ce62396c30a /examples/cpp | |
parent | b4a5727149201bac53a33c53c2cf93fed5414540 (diff) |
reimplement distance calculation in routeguide
Diffstat (limited to 'examples/cpp')
-rw-r--r-- | examples/cpp/route_guide/route_guide_server.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/cpp/route_guide/route_guide_server.cc b/examples/cpp/route_guide/route_guide_server.cc index 24a4184a56..5867c16712 100644 --- a/examples/cpp/route_guide/route_guide_server.cc +++ b/examples/cpp/route_guide/route_guide_server.cc @@ -51,6 +51,7 @@ float ConvertToRadians(float num) { return num * 3.1415926 /180; } +// The formula is based on http://mathforum.org/library/drmath/view/51879.html float GetDistance(const Point& start, const Point& end) { const float kCoordFactor = 10000000.0; float lat_1 = start.latitude() / kCoordFactor; |