1#pragma once
2
3#include <mbgl/math/minmax.hpp>
4
5namespace mbgl {
6namespace util {
7
8template <typename T>
9T clamp(T value, T min_, T max_) {
10 return max(min_, min(max_, value));
11}
12
13} // namespace util
14} // namespace mbgl
15

source code of qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/math/clamp.hpp