From 3ebde459ec244bd78b882973a5954875aee16196 Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Sat, 13 Jul 2024 22:31:00 +0200 Subject: [PATCH] Add constexpr degrees to radians method --- openVulkanoCpp/Math/Math.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openVulkanoCpp/Math/Math.hpp b/openVulkanoCpp/Math/Math.hpp index cdaa1c5..5e3253f 100644 --- a/openVulkanoCpp/Math/Math.hpp +++ b/openVulkanoCpp/Math/Math.hpp @@ -21,6 +21,13 @@ namespace OpenVulkano::Math namespace Utils { using namespace glm; + + template>> + constexpr T Radians(T degree) + { + constexpr T CONVERSION = M_PI / 180.0; + return degree * CONVERSION; + } } template using Matrix2_SIMD = glm::tmat2x2;