summaryrefslogtreecommitdiff
path: root/basegfx/source/matrix/b3dhommatrix.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-18 14:50:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-19 08:30:31 +0200
commit5dccf84b14ed0e09262411295c5880f787342d59 (patch)
tree10a9cc313da0186f7a21c02ce8382c62b7f17c61 /basegfx/source/matrix/b3dhommatrix.cxx
parentbc003c7d41c31509882646900c0b2cc8678f0215 (diff)
loplugin:flatten in basegfx
Change-Id: Ic8bc586e1a4977322dcb371c0fff6411783df9d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92484 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx/source/matrix/b3dhommatrix.cxx')
-rw-r--r--basegfx/source/matrix/b3dhommatrix.cxx70
1 files changed, 35 insertions, 35 deletions
diff --git a/basegfx/source/matrix/b3dhommatrix.cxx b/basegfx/source/matrix/b3dhommatrix.cxx
index e3f3d3d28475..2a56c7a28795 100644
--- a/basegfx/source/matrix/b3dhommatrix.cxx
+++ b/basegfx/source/matrix/b3dhommatrix.cxx
@@ -149,50 +149,50 @@ namespace basegfx
void B3DHomMatrix::rotate(double fAngleX,double fAngleY,double fAngleZ)
{
- if(!fTools::equalZero(fAngleX) || !fTools::equalZero(fAngleY) || !fTools::equalZero(fAngleZ))
+ if(!(!fTools::equalZero(fAngleX) || !fTools::equalZero(fAngleY) || !fTools::equalZero(fAngleZ)))
+ return;
+
+ if(!fTools::equalZero(fAngleX))
{
- if(!fTools::equalZero(fAngleX))
- {
- Impl3DHomMatrix aRotMatX;
- double fSin(sin(fAngleX));
- double fCos(cos(fAngleX));
+ Impl3DHomMatrix aRotMatX;
+ double fSin(sin(fAngleX));
+ double fCos(cos(fAngleX));
- aRotMatX.set(1, 1, fCos);
- aRotMatX.set(2, 2, fCos);
- aRotMatX.set(2, 1, fSin);
- aRotMatX.set(1, 2, -fSin);
+ aRotMatX.set(1, 1, fCos);
+ aRotMatX.set(2, 2, fCos);
+ aRotMatX.set(2, 1, fSin);
+ aRotMatX.set(1, 2, -fSin);
- mpImpl->doMulMatrix(aRotMatX);
- }
+ mpImpl->doMulMatrix(aRotMatX);
+ }
- if(!fTools::equalZero(fAngleY))
- {
- Impl3DHomMatrix aRotMatY;
- double fSin(sin(fAngleY));
- double fCos(cos(fAngleY));
+ if(!fTools::equalZero(fAngleY))
+ {
+ Impl3DHomMatrix aRotMatY;
+ double fSin(sin(fAngleY));
+ double fCos(cos(fAngleY));
- aRotMatY.set(0, 0, fCos);
- aRotMatY.set(2, 2, fCos);
- aRotMatY.set(0, 2, fSin);
- aRotMatY.set(2, 0, -fSin);
+ aRotMatY.set(0, 0, fCos);
+ aRotMatY.set(2, 2, fCos);
+ aRotMatY.set(0, 2, fSin);
+ aRotMatY.set(2, 0, -fSin);
- mpImpl->doMulMatrix(aRotMatY);
- }
+ mpImpl->doMulMatrix(aRotMatY);
+ }
- if(!fTools::equalZero(fAngleZ))
- {
- Impl3DHomMatrix aRotMatZ;
- double fSin(sin(fAngleZ));
- double fCos(cos(fAngleZ));
+ if(fTools::equalZero(fAngleZ))
+ return;
- aRotMatZ.set(0, 0, fCos);
- aRotMatZ.set(1, 1, fCos);
- aRotMatZ.set(1, 0, fSin);
- aRotMatZ.set(0, 1, -fSin);
+ Impl3DHomMatrix aRotMatZ;
+ double fSin(sin(fAngleZ));
+ double fCos(cos(fAngleZ));
- mpImpl->doMulMatrix(aRotMatZ);
- }
- }
+ aRotMatZ.set(0, 0, fCos);
+ aRotMatZ.set(1, 1, fCos);
+ aRotMatZ.set(1, 0, fSin);
+ aRotMatZ.set(0, 1, -fSin);
+
+ mpImpl->doMulMatrix(aRotMatZ);
}
void B3DHomMatrix::rotate(const B3DTuple& rRotation)