diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-09-16 17:04:55 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:27:10 +0300 |
commit | db28626a8bf5fac575ccf8440539b16ce93f9941 (patch) | |
tree | a5d8edc335f029fa999f2941a1c8da6381c3e918 /geometry | |
parent | a0391590b28c153c4058e587b2cc0e3bab27f4c2 (diff) |
review fixes
Diffstat (limited to 'geometry')
-rw-r--r-- | geometry/polyline2d.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/geometry/polyline2d.hpp b/geometry/polyline2d.hpp index 14b169e3cc..d3a22b5168 100644 --- a/geometry/polyline2d.hpp +++ b/geometry/polyline2d.hpp @@ -37,10 +37,10 @@ public: return dist; } - double GetShortestSquareDistance(m2::PointD const & point) const + double GetShortestSquareDistance(m2::Point<T> const & point) const { double res = numeric_limits<double>::max(); - m2::DistanceToLineSquare<m2::PointD> d; + m2::DistanceToLineSquare<m2::Point<T> > d; TIter i = Begin(); for (TIter j = i + 1; j != End(); ++i, ++j) @@ -74,6 +74,8 @@ public: typedef typename TContainer::const_iterator TIter; TIter Begin() const { return m_points.begin(); } TIter End() const { return m_points.end(); } + Point<T> const & Front() const { return m_points.front(); } + Point<T> const & Back() const { return m_points.back(); } friend string DebugPrint(PolylineT<T> const & p) { |