Math: Replace M_PI defines with template constexpr constants

This commit is contained in:
Jérôme Leclercq
2021-06-05 16:35:15 +02:00
parent df8b4b59e3
commit bd1f5214b8
9 changed files with 27 additions and 45 deletions

View File

@@ -61,7 +61,7 @@ TEST_CASE("DegreeToRadian", "[MATH][ALGORITHM]")
{
SECTION("Convert 45.f degree to radian")
{
REQUIRE(Nz::DegreeToRadian(45.f) == Approx(M_PI / 4));
REQUIRE(Nz::DegreeToRadian(45.f) == Approx(Nz::Pi<float> / 4.f));
}
}
@@ -323,7 +323,7 @@ TEST_CASE("RadianToDegree", "[MATH][ALGORITHM]")
{
SECTION("PI / 4 to degree")
{
REQUIRE(Nz::RadianToDegree(M_PI / 4) == Approx(45.f));
REQUIRE(Nz::RadianToDegree(Nz::Pi<float> / 4.f) == Approx(45.f));
}
}