summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/clonetiler.cpp
diff options
context:
space:
mode:
authorFlorian Märkl <info@florianmaerkl.de>2018-01-10 13:56:48 +0000
committerFlorian Märkl <info@florianmaerkl.de>2018-01-10 13:56:48 +0000
commit559da6cb3f4c75c2ec8ae95d61ce99366b4834e4 (patch)
tree798e77d411fb70d0d90a66ad003028877da156dc /src/ui/dialog/clonetiler.cpp
parentTiled Cloned: Simplify shift exponent code (diff)
downloadinkscape-559da6cb3f4c75c2ec8ae95d61ce99366b4834e4.tar.gz
inkscape-559da6cb3f4c75c2ec8ae95d61ce99366b4834e4.zip
Tiled Cloned: Remove check for 1.0 in shift exponent code
Diffstat (limited to 'src/ui/dialog/clonetiler.cpp')
-rw-r--r--src/ui/dialog/clonetiler.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index 30cc98736..2abd6af6b 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -1315,14 +1315,10 @@ Geom::Affine CloneTiler::get_transform(
if( !shifty_excludeh ) shiftj += j;
// Add exponential shift if necessary
- if (shiftx_exp != 1.0) {
- double sign = (shifti > 0.0) ? 1.0 : -1.0;
- shifti = sign * pow(fabs(shifti), shiftx_exp);
- }
- if (shifty_exp != 1.0) {
- double sign = (shiftj > 0.0) ? 1.0 : -1.0;
- shiftj = sign * pow(fabs(shiftj), shifty_exp);
- }
+ double shifti_sign = (shifti > 0.0) ? 1.0 : -1.0;
+ shifti = shifti_sign * pow(fabs(shifti), shiftx_exp);
+ double shiftj_sign = (shiftj > 0.0) ? 1.0 : -1.0;
+ shiftj = shiftj_sign * pow(fabs(shiftj), shifty_exp);
// Final shift
Geom::Affine rect_translate (Geom::Translate (w * shifti, h * shiftj));