From 6a45579dbbf991c0e12ce59958e3b533d19fc9d4 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Tue, 7 May 2024 06:02:29 -0400 Subject: rotating skyboxgit add -A --- glm-master/test/ext/ext_matrix_common.cpp | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 glm-master/test/ext/ext_matrix_common.cpp (limited to 'glm-master/test/ext/ext_matrix_common.cpp') diff --git a/glm-master/test/ext/ext_matrix_common.cpp b/glm-master/test/ext/ext_matrix_common.cpp new file mode 100644 index 0000000..df0c3fe --- /dev/null +++ b/glm-master/test/ext/ext_matrix_common.cpp @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include + +static int test_mix() +{ + int Error = 0; + + { + glm::mat4 A(2); + glm::mat4 B(4); + glm::mat4 C = glm::mix(A, B, 0.5f); + glm::bvec4 const D = glm::equal(C, glm::mat4(3), 1); + Error += glm::all(D) ? 0 : 1; + } + + { + glm::mat4 A(2); + glm::mat4 B(4); + glm::mat4 C = glm::mix(A, B, 0.5); + glm::bvec4 const D = glm::equal(C, glm::mat4(3), 1); + Error += glm::all(D) ? 0 : 1; + } + + { + glm::dmat4 A(2); + glm::dmat4 B(4); + glm::dmat4 C = glm::mix(A, B, 0.5); + glm::bvec4 const D = glm::equal(C, glm::dmat4(3), 1); + Error += glm::all(D) ? 0 : 1; + } + + { + glm::dmat4 A(2); + glm::dmat4 B(4); + glm::dmat4 C = glm::mix(A, B, 0.5f); + glm::bvec4 const D = glm::equal(C, glm::dmat4(3), 1); + Error += glm::all(D) ? 0 : 1; + } + + return Error; +} + +int main() +{ + int Error = 0; + + Error += test_mix(); + + return Error; +} -- cgit v1.2.3-70-g09d2