From d7189eb7d443f7e94940b02e3295049ac4936223 Mon Sep 17 00:00:00 2001 From: Orange Date: Tue, 9 Dec 2025 10:16:57 +0300 Subject: [PATCH] added extra test --- tests/general/unit_test_mat.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/general/unit_test_mat.cpp b/tests/general/unit_test_mat.cpp index 07aaab8..08ed471 100644 --- a/tests/general/unit_test_mat.cpp +++ b/tests/general/unit_test_mat.cpp @@ -231,3 +231,13 @@ TEST(UnitTestMatStandalone, Equanity) EXPECT_EQ(ndc_left_handed, ndc_right_handed); } +TEST(UnitTestMatStandalone, MatPerspectiveLeftHanded) +{ + auto perspective_proj = mat_perspective_left_handed(90.f, 16.f/9.f, 0.1f, 1000.f); + auto projected = perspective_proj + * mat_column_from_vector({0, 0, 0.1001}); + + projected /= projected.at(3, 0); + + EXPECT_TRUE(projected.at(2, 0) > -1.0f && projected.at(2, 0) < 0.f); +} \ No newline at end of file