summaryrefslogtreecommitdiff
path: root/include/mbgl/util/math.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/util/math.hpp')
-rw-r--r--include/mbgl/util/math.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/util/math.hpp b/include/mbgl/util/math.hpp
index fde2a4720b..2bef5b18e2 100644
--- a/include/mbgl/util/math.hpp
+++ b/include/mbgl/util/math.hpp
@@ -104,6 +104,10 @@ T smoothstep(T edge0, T edge1, T x) {
return t * t * (T(3) - T(2) * t);
}
+// Computes the log2(x) rounded up to the next integer.
+// (== number of bits required to store x)
+uint32_t ceil_log2(uint64_t x);
+
}
}