From 5a735fd0f884f6ee594c315c3662501b140afe7f Mon Sep 17 00:00:00 2001 From: ExMix Date: Mon, 17 Mar 2014 13:46:56 +0300 Subject: [PATCH] hide compass on anti-clockenwise animation --- geometry/angles.cpp | 4 ++++ map/animator.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/geometry/angles.cpp b/geometry/angles.cpp index 172a948c60..2d48c3cf24 100644 --- a/geometry/angles.cpp +++ b/geometry/angles.cpp @@ -10,6 +10,10 @@ double AngleIn2PI(double ang) ang = fmod(ang, period); if (ang < 0.0) ang += period; + + if (my::AlmostEqual(period, ang)) + return 0.0; + return ang; } diff --git a/map/animator.cpp b/map/animator.cpp index bb1c8e9de3..65950fd417 100644 --- a/map/animator.cpp +++ b/map/animator.cpp @@ -42,7 +42,7 @@ void Animator::RotateScreen(double startAngle, double endAngle) } else { - double const eps = my::DegToRad(3.0); + double const eps = my::DegToRad(1.5); if (fabs(ang::GetShortestDistance(startAngle, endAngle)) > eps) {