Math: Remove NAZARA_MATH_ANGLE_RADIAN and functions using it

This commit is contained in:
Jérôme Leclercq
2021-06-01 17:37:40 +02:00
parent d0d65be35f
commit 4d74cef034
29 changed files with 234 additions and 323 deletions

View File

@@ -1,6 +1,6 @@
#include <Nazara/Math/Vector2.hpp>
#include <Catch/catch.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Math/Vector4.hpp>
SCENARIO("Vector2", "[MATH][VECTOR2]")
@@ -27,9 +27,9 @@ SCENARIO("Vector2", "[MATH][VECTOR2]")
{
REQUIRE(firstUnit.AbsDotProduct(tmp) == Approx(2.f));
REQUIRE(firstUnit.DotProduct(tmp) == Approx(0.f));
REQUIRE(firstUnit.AngleBetween(tmp) == Approx(Nz::FromDegrees(90.f)));
REQUIRE(firstUnit.AngleBetween(tmp) == Nz::DegreeAnglef(90.f));
Nz::Vector2f negativeUnitX = -Nz::Vector2f::UnitX();
REQUIRE(negativeUnitX.AngleBetween(negativeUnitX + Nz::Vector2f(0, 0.0000001f)) == Approx(Nz::FromDegrees(360.f)));
REQUIRE(negativeUnitX.AngleBetween(negativeUnitX + Nz::Vector2f(0, 0.0000001f)) == Nz::DegreeAnglef(360.f));
}
}