summaryrefslogtreecommitdiffhomepage
path: root/cv/numeric.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cv/numeric.hpp')
-rw-r--r--cv/numeric.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/cv/numeric.hpp b/cv/numeric.hpp
index 0edb7f58..2050e8e4 100644
--- a/cv/numeric.hpp
+++ b/cv/numeric.hpp
@@ -1,13 +1,15 @@
#pragma once
-#include <opencv2/core.hpp>
+#include <type_traits>
+#include <opencv2/core/matx.hpp>
-namespace types {
- using f = double;
+namespace numeric_types {
+ using f = float;
- namespace constants {
- static constexpr inline f eps = f(1e-8);
- }
+ static_assert(std::is_floating_point_v<f>);
+
+ static constexpr f eps = f(1e-8);
+ static constexpr f pi = f(M_PI);
template<int n> using vec = cv::Vec<f, n>;
using vec2 = vec<2>;