diff options
Diffstat (limited to 'src/mbgl/util/interpolate.hpp')
-rw-r--r-- | src/mbgl/util/interpolate.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mbgl/util/interpolate.hpp b/src/mbgl/util/interpolate.hpp index ef066377da..d463ffc056 100644 --- a/src/mbgl/util/interpolate.hpp +++ b/src/mbgl/util/interpolate.hpp @@ -1,15 +1,19 @@ #pragma once +#include <mbgl/util/color.hpp> +#include <mbgl/util/range.hpp> + #include <array> #include <vector> #include <string> #include <type_traits> #include <utility> -#include <mbgl/util/color.hpp> namespace mbgl { namespace util { +float interpolationFactor(float base, Range<float> range, float z); + template <class T, class Enabled = void> struct Interpolator; @@ -78,5 +82,8 @@ template <class T> struct Interpolator<std::vector<T>> : Uninterpolated {}; +template <class T> +constexpr bool Interpolatable = !std::is_base_of<Uninterpolated, Interpolator<T>>::value; + } // namespace util } // namespace mbgl |