diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-11-30 10:29:16 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-12-06 15:05:45 -0800 |
commit | 05b0dcd0f87b90d179d9d0aeeb6a618b9f836a79 (patch) | |
tree | fbe5f276fdb1fb8769ac52efcfbdc612af42b56d /include | |
parent | 0adf830b9a008f5c5b5a386a152a7a2dbc0c79c4 (diff) | |
download | qtlocation-mapboxgl-05b0dcd0f87b90d179d9d0aeeb6a618b9f836a79.tar.gz |
[core] Move evaluation algorithm to Function
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/function.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mbgl/style/function.hpp b/include/mbgl/style/function.hpp index 6103f85e35..b023229e4f 100644 --- a/include/mbgl/style/function.hpp +++ b/include/mbgl/style/function.hpp @@ -1,7 +1,8 @@ #pragma once -#include <vector> +#include <cassert> #include <utility> +#include <vector> namespace mbgl { namespace style { @@ -20,6 +21,8 @@ public: float getBase() const { return base; } const std::vector<std::pair<float, T>>& getStops() const { return stops; } + T evaluate(float z) const; + friend bool operator==(const Function& lhs, const Function& rhs) { return lhs.base == rhs.base && lhs.stops == rhs.stops; } |