diff options
Diffstat (limited to 'cv/numeric.hpp')
-rw-r--r-- | cv/numeric.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cv/numeric.hpp b/cv/numeric.hpp index 0edb7f58..ce8f7e82 100644 --- a/cv/numeric.hpp +++ b/cv/numeric.hpp @@ -1,13 +1,15 @@ #pragma once +#include <type_traits> #include <opencv2/core.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>; |