From 4c16594b3f2bce88eb23f236252966de112e5ded Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sun, 23 Feb 2025 11:46:43 +0300 Subject: [PATCH] Use pi casted to appropriate type instead of implicit conversion to double in math/math.hpp --- libs/math/include/psemek/math/math.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/math/include/psemek/math/math.hpp b/libs/math/include/psemek/math/math.hpp index 40d3d3e8..d29f14f9 100644 --- a/libs/math/include/psemek/math/math.hpp +++ b/libs/math/include/psemek/math/math.hpp @@ -35,13 +35,13 @@ namespace psemek::math template T deg(T x) { - return static_cast((180 * x) / pi); + return static_cast((180 * x) / static_cast(pi)); } template T rad(T x) { - return static_cast((x * pi) / 180); + return static_cast((x * static_cast(pi)) / 180); } template