From c2ef7737536bf1f8c81fcfae95c0183b21c9753f Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 3 Jun 2022 23:25:43 -0700 Subject: Changeset: 62 Branch comment: [] [WIP] Initial migration --- .../source/test/ext/ext_quaternion_exponential.cpp | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp (limited to '3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp') diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp deleted file mode 100644 index fbcdbef..0000000 --- a/3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -int test_log() -{ - typedef typename quaType::value_type T; - - T const Epsilon = static_cast(0.001f); - - int Error = 0; - - quaType const Q(vecType(1, 0, 0), vecType(0, 1, 0)); - quaType const P = glm::log(Q); - Error += glm::any(glm::notEqual(Q, P, Epsilon)) ? 0 : 1; - - quaType const R = glm::exp(P); - Error += glm::all(glm::equal(Q, R, Epsilon)) ? 0 : 1; - - return Error; -} - -template -int test_pow() -{ - typedef typename quaType::value_type T; - - T const Epsilon = static_cast(0.001f); - - int Error = 0; - - quaType const Q(vecType(1, 0, 0), vecType(0, 1, 0)); - - { - T const One = static_cast(1.0f); - quaType const P = glm::pow(Q, One); - Error += glm::all(glm::equal(Q, P, Epsilon)) ? 0 : 1; - } - - { - T const Two = static_cast(2.0f); - quaType const P = glm::pow(Q, Two); - quaType const R = Q * Q; - Error += glm::all(glm::equal(P, R, Epsilon)) ? 0 : 1; - - quaType const U = glm::sqrt(P); - Error += glm::all(glm::equal(Q, U, Epsilon)) ? 0 : 1; - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_log(); - Error += test_log(); - Error += test_log(); - Error += test_log(); - - Error += test_log(); - Error += test_log(); - Error += test_log(); - Error += test_log(); - - Error += test_pow(); - Error += test_pow(); - Error += test_pow(); - Error += test_pow(); - - Error += test_pow(); - Error += test_pow(); - Error += test_pow(); - Error += test_pow(); - - return Error; -} -- cgit v1.2.3-70-g09d2