From 88fb437eb3a0b7f0eb86184e5269332d7d0282c3 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Mon, 15 Mar 2010 21:17:26 +0000 Subject: [PATCH] Fix regression in Points::transform --- src/Points.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Points.cpp b/src/Points.cpp index 41234e5..3599bfe 100644 --- a/src/Points.cpp +++ b/src/Points.cpp @@ -336,25 +336,25 @@ void Points::transform(const track::TravelToken& aToken, double aDelta) const // point makes to (one of) the axis at this point const Vector deriv = myCurve.deriv(fValue); const float angle = - radToDeg(atanf(deriv.y / deriv.x)); + radToDeg(atanf(deriv.z / deriv.x)); if (myAxis == -axis::X) { xTrans = 1.0f - curveValue.x; - yTrans = reflected ? curveValue.y : -curveValue.y; + yTrans = reflected ? curveValue.z : -curveValue.z; rotate = reflected ? angle : -angle; } else if (myAxis == axis::X) { xTrans = curveValue.x; - yTrans = reflected ? -curveValue.y : curveValue.y; + yTrans = reflected ? -curveValue.z : curveValue.z; rotate = reflected ? angle : -angle; } else if (myAxis == -axis::Y) { - xTrans = reflected ? -curveValue.y : curveValue.y; + xTrans = reflected ? -curveValue.z : curveValue.z; yTrans = 1.0f - curveValue.x; rotate = reflected ? angle : -angle; } else if (myAxis == axis::Y) { - xTrans = reflected ? curveValue.y : -curveValue.y; + xTrans = reflected ? curveValue.z: -curveValue.z; yTrans = curveValue.x; rotate = reflected ? angle : -angle; } -- 2.39.2