ofz#33235 Integer-overflow

Change-Id: I7a717a5bfdd58f22de3dcd61fe4aad67d1463a42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114099
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2021-04-14 18:33:16 +02:00
parent d20f118dbc
commit 2f752afbb0
+1 -1
View File
@@ -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));
}