summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/source/generic/poly.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 9d06055150b4..e482528b9ab1 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -57,7 +57,7 @@
static double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR )
{
const tools::Long nDX = rPt.X() - rCenter.X();
- double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0 ) ? 0.000000001 : nDX ) );
+ double fAngle = atan2( o3tl::saturating_toggle_sign(rPt.Y()) + rCenter.Y(), ( ( nDX == 0 ) ? 0.000000001 : nDX ) );
return atan2(fWR*sin(fAngle), fHR*cos(fAngle));
}