diff --git a/rtengine/coord.cc b/rtengine/coord.cc index 4b5dcf40b..8a3d7d080 100644 --- a/rtengine/coord.cc +++ b/rtengine/coord.cc @@ -41,7 +41,7 @@ PolarCoord& PolarCoord::operator= (const Coord& other) const double y = other.y; radius = rtengine::norm2 (x, y); - angle = std::atan2 (x, y) * 180.0 / M_PI; + angle = std::atan2 (y, x) * 180.0 / M_PI; return *this; }