From b9c7e1bdd99b4c6d37672ef34ffe178d4bc54ad3 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 5 Aug 2014 18:04:31 -0700 Subject: Consolidate duplicate interpolation definitions While here, do not interpolate style properties that are not transitionable. The previous behavior was to switch from old to new value halfway through the transition; now the new value is used immediately, as in JS. --- src/geometry/resample.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/geometry/resample.cpp') diff --git a/src/geometry/resample.cpp b/src/geometry/resample.cpp index c40fc9bb0a..abb3ef1e3c 100644 --- a/src/geometry/resample.cpp +++ b/src/geometry/resample.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include @@ -43,7 +43,8 @@ Anchors resample(const std::vector &vertices, float spacing, markedDistance += spacing; float t = (markedDistance - distance) / segmentDist, - x = util::interp(a.x, b.x, t), y = util::interp(a.y, b.y, t), + x = util::interpolate(a.x, b.x, t), + y = util::interpolate(a.y, b.y, t), s = minScales[added % len]; if (x >= 0 && x < 4096 && y >= 0 && y < 4096) { -- cgit v1.2.1