Bug fixes.

This commit is contained in:
THoehne
2024-08-27 13:29:30 +02:00
parent 5bb287425b
commit 7ff9493708
10 changed files with 188 additions and 124 deletions

View File

@@ -1246,5 +1246,29 @@ namespace MatrixTests
0.356495f, -0.287009f, -0.024169f, 0.033232f));
EXPECT_TRUE(PMath::Transpose(m0) == PMath::Matrix4(1.0f, 2.0f, 2.0f, 8.0f, 5.0f, 6.0f, -3.0f, -4.0f, 3.0f, 4.0f, 5.0f, 6.0f, 4.0f, 1.0f, 3.0f, -2.0f));
}
}
namespace Misc
{
TEST(Point, FloatPoint)
{
EXPECT_FLOAT_EQ(PMath::Distance(PMath::Point2(7.0f, 3.0f), PMath::Point2(4.0f, -1.0f)), 5.0f);
EXPECT_FLOAT_EQ(PMath::Distance(PMath::Point3(7.0f, 3.0f, 4.0f), PMath::Point3(4.0f, -1.0f, 3.0f)), 5.099019f);
EXPECT_FLOAT_EQ(PMath::Distance(PMath::Point4(7.0f, 3.0f, 4.0f, 5.0f), PMath::Point4(4.0f, -1.0f, 3.0f, -5.0f)), 11.224972f);
}
}
namespace Plane
{
TEST(Plane, OperatorTests)
{
PMath::Plane pl1;
PMath::Plane pl2;
}
}