From d40bcce474d1135f7a24a0534a1cde71b5660ad7 Mon Sep 17 00:00:00 2001 From: Alex Foster <123afoster@gmail.com> Date: Wed, 6 Nov 2024 23:57:58 -0800 Subject: [PATCH] add matrix4::ortho test --- test/testmatrix.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/testmatrix.cpp b/test/testmatrix.cpp index ceefd8da..c7ed8802 100644 --- a/test/testmatrix.cpp +++ b/test/testmatrix.cpp @@ -1196,6 +1196,14 @@ namespace assert(m.c == vec4(0,0,2,0)); assert(m.d == vec4(-3,-3,3,1)); } + { + matrix4 m; + m.ortho(-1,1,-1,1,-1,1); + assert(m.a == vec4(1,0,0,0)); + assert(m.b == vec4(0,1,0,0)); + assert(m.c == vec4(0,0,-1,0)); + assert(m.d == vec4(0,0,0,1)); + } } void test_matrix4_transformnormal()