tdf#147906 used std::hypot for Pythagorean addition
Change-Id: I9bf10374af93cd22e429a112937aaa8828126523 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131504 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
This commit is contained in:
parent
a40ed687a3
commit
67fcd8f268
1 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,7 @@ namespace basegfx
|
|||
// add object expansion
|
||||
if(bCircular)
|
||||
{
|
||||
const double fOriginalDiag(sqrt((fTargetSizeX * fTargetSizeX) + (fTargetSizeY * fTargetSizeY)));
|
||||
const double fOriginalDiag(std::hypot(fTargetSizeX, fTargetSizeY));
|
||||
|
||||
fTargetOffsetX -= (fOriginalDiag - fTargetSizeX) / 2.0;
|
||||
fTargetOffsetY -= (fOriginalDiag - fTargetSizeY) / 2.0;
|
||||
|
@ -418,7 +418,7 @@ namespace basegfx
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
const double t(1.0 - sqrt(aCoor.getX() * aCoor.getX() + aCoor.getY() * aCoor.getY()));
|
||||
const double t(1.0 - std::hypot(aCoor.getX(), aCoor.getY()));
|
||||
const sal_uInt32 nSteps(rGradInfo.getSteps());
|
||||
|
||||
if(nSteps && t < 1.0)
|
||||
|
|
Loading…
Reference in a new issue