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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user