diff options
author | Denis Koronchik <denis@mapswithme.com> | 2014-08-21 16:41:06 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:28:05 +0300 |
commit | 9f8b7b7cb58be1c7d8326eec25b87a96451ba824 (patch) | |
tree | 0ad844acb7fa9f581f8d3cfd92971f129ed5ca09 /geometry | |
parent | 7c32b48e2621d6c5a3f78458168f1804c5bfca48 (diff) |
[routing] Work on route data generation
Diffstat (limited to 'geometry')
-rw-r--r-- | geometry/point2d.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/geometry/point2d.hpp b/geometry/point2d.hpp index 23e0627e04..c75ca2667e 100644 --- a/geometry/point2d.hpp +++ b/geometry/point2d.hpp @@ -124,6 +124,11 @@ namespace m2 return m2::Point<T>(x / scale, y / scale); } + m2::Point<T> mid(m2::Point<T> const & p) const + { + return m2::Point<T>((x + p.x) * 0.5, (y + p.y) * 0.5); + } + /// @name VectorOperationsOnPoint // @{ double Length() const |