From c568f0a8c9f0aef00c770b494ee1ff3a89ab48de Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 22 May 2022 01:08:24 -0700 Subject: Changeset: 35 Fix missing sources in git submodules after migration to PlasticSCM --- 3rdparty/glm/source/test/ext/ext_matrix_common.cpp | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 3rdparty/glm/source/test/ext/ext_matrix_common.cpp (limited to '3rdparty/glm/source/test/ext/ext_matrix_common.cpp') diff --git a/3rdparty/glm/source/test/ext/ext_matrix_common.cpp b/3rdparty/glm/source/test/ext/ext_matrix_common.cpp new file mode 100644 index 0000000..df0c3fe --- /dev/null +++ b/3rdparty/glm/source/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