diff --git a/libs/math/include/psemek/math/interval.hpp b/libs/math/include/psemek/math/interval.hpp index d2a55d4e..80542481 100644 --- a/libs/math/include/psemek/math/interval.hpp +++ b/libs/math/include/psemek/math/interval.hpp @@ -98,7 +98,7 @@ namespace psemek::math T center() const { - return min + (max - min) / 2; + return min + (max - min) / T(2); } using iterator = interval_iterator; diff --git a/libs/math/include/psemek/math/matrix.hpp b/libs/math/include/psemek/math/matrix.hpp index eabfd12f..d3f81f6c 100644 --- a/libs/math/include/psemek/math/matrix.hpp +++ b/libs/math/include/psemek/math/matrix.hpp @@ -57,14 +57,14 @@ namespace psemek::math { matrix m; for (std::size_t i = 0; i < R * C; ++i) - m.coords[i] = 0; + m.coords[i] = T(0); return m; } template matrix matrix::identity() { - return scalar(T{1}); + return scalar(T(1)); } template diff --git a/libs/math/include/psemek/math/point.hpp b/libs/math/include/psemek/math/point.hpp index 7cb5d2bf..8b05a67d 100644 --- a/libs/math/include/psemek/math/point.hpp +++ b/libs/math/include/psemek/math/point.hpp @@ -56,7 +56,7 @@ namespace psemek::math { point p; for (std::size_t i = 0; i < N; ++i) - p[i] = 0; + p[i] = T(0); return p; }