summaryrefslogtreecommitdiff
path: root/include/mbgl/style/function.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/function.hpp')
-rw-r--r--include/mbgl/style/function.hpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/include/mbgl/style/function.hpp b/include/mbgl/style/function.hpp
deleted file mode 100644
index b023229e4f..0000000000
--- a/include/mbgl/style/function.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once
-
-#include <cassert>
-#include <utility>
-#include <vector>
-
-namespace mbgl {
-namespace style {
-
-template <typename T>
-class Function {
-public:
- using Stop = std::pair<float, T>;
- using Stops = std::vector<Stop>;
-
- Function(Stops stops_, float base_)
- : base(base_), stops(std::move(stops_)) {
- assert(stops.size() > 0);
- }
-
- 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;
- }
-
- friend bool operator!=(const Function& lhs, const Function& rhs) {
- return !(lhs == rhs);
- }
-
-private:
- float base = 1;
- std::vector<std::pair<float, T>> stops;
-};
-
-} // namespace style
-} // namespace mbgl