Fix unit tests

This commit is contained in:
Lynix
2018-01-07 03:50:35 +01:00
parent ee77899a6a
commit 234aa90f51
5 changed files with 36 additions and 28 deletions

View File

@@ -96,7 +96,7 @@ SCENARIO("EulerAngles", "[MATH][EULERANGLES]")
REQUIRE(tmp.roll == Approx(0.f));
tmp = Nz::Quaternionf(euler30.ToQuaternion()).ToEulerAngles();
REQUIRE(tmp.pitch == Approx(30.f));
REQUIRE(tmp.yaw == Approx(0.f));
REQUIRE(tmp.yaw == Approx(0.f).margin(0.0001f));
REQUIRE(tmp.roll == Approx(30.f));
}
}

View File

@@ -83,8 +83,8 @@ SCENARIO("Matrix4", "[MATH][MATRIX4]")
THEN("We get the identity")
{
Nz::Matrix4f tmp = matrix1 * invMatrix1;
CHECK(tmp.m32 == Approx(0.f));
CHECK(tmp.m42 == Approx(0.f));
CHECK(tmp.m32 == Approx(0.f).margin(0.0001f));
CHECK(tmp.m42 == Approx(0.f).margin(0.0001f));
tmp.m32 = 0.f;
tmp.m42 = 0.f;
CHECK(tmp == Nz::Matrix4f::Identity());