| 91 | /// in range [0, 2 * pi] |
| 92 | template <typename T> |
| 93 | T Azimuth(m2::Point<T> const & p1, m2::Point<T> const & p2, T north = 0) |
| 94 | { |
| 95 | T azimuth = math::pi2 - (AngleTo(p1, p2) + north); |
| 96 | if (azimuth < 0) |
| 97 | azimuth += 2.0 * math::pi; |
| 98 | return azimuth; |
| 99 | } |
| 100 | |
| 101 | /// Average angle calcker. Can't find any suitable solution, so decided to do like this: |
| 102 | /// Avg(i) = Avg(Avg(i-1), Ai); |