From 6d52bedffb0c41cd1e21632985804a32cb47b18a Mon Sep 17 00:00:00 2001 From: Orange Date: Thu, 11 Jul 2024 22:42:40 +0300 Subject: [PATCH] removed constexpr --- include/omath/angles.h | 4 ++-- source/angles.cpp | 4 ++-- source/matrix.cpp | 6 ------ tests/CMakeLists.txt | 5 ++++- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/include/omath/angles.h b/include/omath/angles.h index 0140092..03eccd3 100644 --- a/include/omath/angles.h +++ b/include/omath/angles.h @@ -6,6 +6,6 @@ namespace omath::angles { - [[nodiscard]] constexpr float RadiansToDegrees(float rads); - [[nodiscard]] constexpr float DegreesToRadians(float degrees); + [[nodiscard]] float RadiansToDegrees(float rads); + [[nodiscard]] float DegreesToRadians(float degrees); } \ No newline at end of file diff --git a/source/angles.cpp b/source/angles.cpp index 14d1722..3b9b086 100644 --- a/source/angles.cpp +++ b/source/angles.cpp @@ -8,12 +8,12 @@ namespace omath::angles { - constexpr float RadiansToDegrees(const float radiands) + float RadiansToDegrees(const float radiands) { return radiands * (180.f / std::numbers::pi_v); } - constexpr float DegreesToRadians(const float degrees) + float DegreesToRadians(const float degrees) { return degrees * (std::numbers::pi_v / 180.f); } diff --git a/source/matrix.cpp b/source/matrix.cpp index 2298d9b..e520129 100644 --- a/source/matrix.cpp +++ b/source/matrix.cpp @@ -1,12 +1,6 @@ -/* - * Copyright (c) 2022. - * Created by Alpatov Softworks with love in Russia. - */ - #include "omath/matrix.h" #include - #include "omath/Vector3.h" #include #include diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 55d4f36..43c591f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,7 +3,10 @@ enable_testing() project(unit-tests) file(GLOB TEST_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) + include(GoogleTest) add_executable(unit-tests UnitTestColor.cpp UnitTestMatrix.cpp) -target_link_libraries(unit-tests PRIVATE gtest gtest_main omath) \ No newline at end of file +target_link_libraries(unit-tests PRIVATE gtest gtest_main omath) + +gtest_discover_tests(unit-tests) \ No newline at end of file