summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/kitfox/svg/animation/AnimateTransform.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/kitfox/svg/animation/AnimateTransform.java b/src/main/java/com/kitfox/svg/animation/AnimateTransform.java
index 14e39c2..e3d48d5 100644
--- a/src/main/java/com/kitfox/svg/animation/AnimateTransform.java
+++ b/src/main/java/com/kitfox/svg/animation/AnimateTransform.java
@@ -182,10 +182,10 @@ public class AnimateTransform extends AnimateXform
{
case TR_TRANSLATE:
{
- double x0 = fromValue.length > 1 ? fromValue[0] : 0;
- double x1 = toValue.length > 1 ? toValue[0] : 0;
- double y0 = fromValue.length > 2 ? fromValue[1] : 0;
- double y1 = toValue.length > 2 ? toValue[1] : 0;
+ double x0 = fromValue.length >= 1 ? fromValue[0] : 0;
+ double x1 = toValue.length >= 1 ? toValue[0] : 0;
+ double y0 = fromValue.length >= 2 ? fromValue[1] : 0;
+ double y1 = toValue.length >= 2 ? toValue[1] : 0;
double x = lerp(x0, x1, interp);
double y = lerp(y0, y1, interp);
@@ -208,10 +208,10 @@ public class AnimateTransform extends AnimateXform
}
case TR_SCALE:
{
- double x0 = fromValue.length > 1 ? fromValue[0] : 1;
- double x1 = toValue.length > 1 ? toValue[0] : 1;
- double y0 = fromValue.length > 2 ? fromValue[1] : 1;
- double y1 = toValue.length > 2 ? toValue[1] : 1;
+ double x0 = fromValue.length >= 1 ? fromValue[0] : 1;
+ double x1 = toValue.length >= 1 ? toValue[0] : 1;
+ double y0 = fromValue.length >= 2 ? fromValue[1] : 1;
+ double y1 = toValue.length >= 2 ? toValue[1] : 1;
double x = lerp(x0, x1, interp);
double y = lerp(y0, y1, interp);