mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
removed constexpr
This commit is contained in:
@@ -6,6 +6,6 @@
|
|||||||
|
|
||||||
namespace omath::angles
|
namespace omath::angles
|
||||||
{
|
{
|
||||||
[[nodiscard]] constexpr float RadiansToDegrees(float rads);
|
[[nodiscard]] float RadiansToDegrees(float rads);
|
||||||
[[nodiscard]] constexpr float DegreesToRadians(float degrees);
|
[[nodiscard]] float DegreesToRadians(float degrees);
|
||||||
}
|
}
|
||||||
@@ -8,12 +8,12 @@
|
|||||||
|
|
||||||
namespace omath::angles
|
namespace omath::angles
|
||||||
{
|
{
|
||||||
constexpr float RadiansToDegrees(const float radiands)
|
float RadiansToDegrees(const float radiands)
|
||||||
{
|
{
|
||||||
return radiands * (180.f / std::numbers::pi_v<float>);
|
return radiands * (180.f / std::numbers::pi_v<float>);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr float DegreesToRadians(const float degrees)
|
float DegreesToRadians(const float degrees)
|
||||||
{
|
{
|
||||||
return degrees * (std::numbers::pi_v<float> / 180.f);
|
return degrees * (std::numbers::pi_v<float> / 180.f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022.
|
|
||||||
* Created by Alpatov Softworks with love in Russia.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "omath/matrix.h"
|
#include "omath/matrix.h"
|
||||||
|
|
||||||
#include <format>
|
#include <format>
|
||||||
|
|
||||||
#include "omath/Vector3.h"
|
#include "omath/Vector3.h"
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ enable_testing()
|
|||||||
project(unit-tests)
|
project(unit-tests)
|
||||||
|
|
||||||
file(GLOB TEST_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
file(GLOB TEST_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||||
|
|
||||||
include(GoogleTest)
|
include(GoogleTest)
|
||||||
add_executable(unit-tests UnitTestColor.cpp UnitTestMatrix.cpp)
|
add_executable(unit-tests UnitTestColor.cpp UnitTestMatrix.cpp)
|
||||||
|
|
||||||
target_link_libraries(unit-tests PRIVATE gtest gtest_main omath)
|
target_link_libraries(unit-tests PRIVATE gtest gtest_main omath)
|
||||||
|
|
||||||
|
gtest_discover_tests(unit-tests)
|
||||||
Reference in New Issue
Block a user