summaryrefslogtreecommitdiffhomepage
path: root/cv/numeric.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-07 11:05:51 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:48:46 +0100
commitb5cdedb08159655819e73bba0754ef36a5565e66 (patch)
tree74b154889d38bcace79e7048fc24ea4699c4bbfa /cv/numeric.hpp
parent22d3ded34963e663f289c181aa94b54f00693b34 (diff)
cv/numeric: use single precision
Diffstat (limited to 'cv/numeric.hpp')
-rw-r--r--cv/numeric.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cv/numeric.hpp b/cv/numeric.hpp
index 7d850cbe..ee24331f 100644
--- a/cv/numeric.hpp
+++ b/cv/numeric.hpp
@@ -1,9 +1,12 @@
#pragma once
+#include <type_traits>
#include <opencv2/core.hpp>
namespace types {
- using f = double;
+ using f = float;
+
+ static_assert(std::is_floating_point_v<f>);
static constexpr inline f eps = f(1e-8);
static constexpr inline f pi = f(M_PI);