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) {