From 047f294de1b4d385b811ac9f5afc393d81cc4ae9 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 16 Aug 2025 11:23:49 -0700 Subject: Copy changes from the no-history fork, generated back in 2023 Original commit message: > commit f138311d2d2e0cc9ba0496d523bb46f2c1c9fb73 > Author: rtk0c > Date: Wed Sep 20 23:58:58 2023 -0700 > > Copy from the PlasticSCM repo, replace vendored glm wtih conan In reality, this also introduced a few uncommitted changes in the original PlasticSCM repo. See the modified and new files in this patch. --- 3rdparty/glm/source/test/ext/CMakeLists.txt | 55 -- .../glm/source/test/ext/ext_matrix_clip_space.cpp | 13 - 3rdparty/glm/source/test/ext/ext_matrix_common.cpp | 53 -- .../source/test/ext/ext_matrix_int2x2_sized.cpp | 28 - .../source/test/ext/ext_matrix_int2x3_sized.cpp | 28 - .../source/test/ext/ext_matrix_int2x4_sized.cpp | 28 - .../source/test/ext/ext_matrix_int3x2_sized.cpp | 28 - .../source/test/ext/ext_matrix_int3x3_sized.cpp | 28 - .../source/test/ext/ext_matrix_int3x4_sized.cpp | 28 - .../source/test/ext/ext_matrix_int4x2_sized.cpp | 28 - .../source/test/ext/ext_matrix_int4x3_sized.cpp | 28 - .../source/test/ext/ext_matrix_int4x4_sized.cpp | 28 - .../glm/source/test/ext/ext_matrix_integer.cpp | 237 ------- .../glm/source/test/ext/ext_matrix_projection.cpp | 13 - .../glm/source/test/ext/ext_matrix_relational.cpp | 163 ----- .../glm/source/test/ext/ext_matrix_transform.cpp | 61 -- .../source/test/ext/ext_matrix_uint2x2_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint2x3_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint2x4_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint3x2_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint3x3_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint3x4_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint4x2_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint4x3_sized.cpp | 28 - .../source/test/ext/ext_matrix_uint4x4_sized.cpp | 28 - .../glm/source/test/ext/ext_quaternion_common.cpp | 61 -- .../source/test/ext/ext_quaternion_exponential.cpp | 87 --- .../source/test/ext/ext_quaternion_geometric.cpp | 88 --- .../source/test/ext/ext_quaternion_relational.cpp | 51 -- .../source/test/ext/ext_quaternion_transform.cpp | 45 -- .../test/ext/ext_quaternion_trigonometric.cpp | 40 -- .../glm/source/test/ext/ext_quaternion_type.cpp | 113 ---- 3rdparty/glm/source/test/ext/ext_scalar_common.cpp | 360 ----------- .../glm/source/test/ext/ext_scalar_constants.cpp | 36 -- .../glm/source/test/ext/ext_scalar_int_sized.cpp | 43 -- .../glm/source/test/ext/ext_scalar_integer.cpp | 686 --------------------- .../glm/source/test/ext/ext_scalar_packing.cpp | 28 - .../glm/source/test/ext/ext_scalar_reciprocal.cpp | 171 ----- .../glm/source/test/ext/ext_scalar_relational.cpp | 106 ---- .../glm/source/test/ext/ext_scalar_uint_sized.cpp | 43 -- 3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp | 96 --- 3rdparty/glm/source/test/ext/ext_vec1.cpp | 157 ----- 3rdparty/glm/source/test/ext/ext_vector_bool1.cpp | 104 ---- 3rdparty/glm/source/test/ext/ext_vector_common.cpp | 365 ----------- 3rdparty/glm/source/test/ext/ext_vector_iec559.cpp | 166 ----- .../glm/source/test/ext/ext_vector_int1_sized.cpp | 41 -- .../glm/source/test/ext/ext_vector_int2_sized.cpp | 41 -- .../glm/source/test/ext/ext_vector_int3_sized.cpp | 41 -- .../glm/source/test/ext/ext_vector_int4_sized.cpp | 41 -- .../glm/source/test/ext/ext_vector_integer.cpp | 547 ---------------- .../source/test/ext/ext_vector_integer_sized.cpp | 216 ------- .../glm/source/test/ext/ext_vector_packing.cpp | 58 -- .../glm/source/test/ext/ext_vector_reciprocal.cpp | 186 ------ .../glm/source/test/ext/ext_vector_relational.cpp | 205 ------ .../glm/source/test/ext/ext_vector_uint1_sized.cpp | 41 -- .../glm/source/test/ext/ext_vector_uint2_sized.cpp | 41 -- .../glm/source/test/ext/ext_vector_uint3_sized.cpp | 41 -- .../glm/source/test/ext/ext_vector_uint4_sized.cpp | 41 -- 3rdparty/glm/source/test/ext/ext_vector_ulp.cpp | 99 --- 59 files changed, 5584 deletions(-) delete mode 100644 3rdparty/glm/source/test/ext/CMakeLists.txt delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_common.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_integer.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_projection.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_relational.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_transform.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_common.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_quaternion_type.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_common.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_constants.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_integer.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_packing.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_relational.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vec1.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_bool1.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_common.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_iec559.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_integer.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_packing.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_relational.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp delete mode 100644 3rdparty/glm/source/test/ext/ext_vector_ulp.cpp (limited to '3rdparty/glm/source/test/ext') diff --git a/3rdparty/glm/source/test/ext/CMakeLists.txt b/3rdparty/glm/source/test/ext/CMakeLists.txt deleted file mode 100644 index 40c91ba..0000000 --- a/3rdparty/glm/source/test/ext/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -glmCreateTestGTC(ext_matrix_relational) -glmCreateTestGTC(ext_matrix_transform) -glmCreateTestGTC(ext_matrix_common) -glmCreateTestGTC(ext_matrix_integer) -glmCreateTestGTC(ext_matrix_int2x2_sized) -glmCreateTestGTC(ext_matrix_int2x3_sized) -glmCreateTestGTC(ext_matrix_int2x4_sized) -glmCreateTestGTC(ext_matrix_int3x2_sized) -glmCreateTestGTC(ext_matrix_int3x3_sized) -glmCreateTestGTC(ext_matrix_int3x4_sized) -glmCreateTestGTC(ext_matrix_int4x2_sized) -glmCreateTestGTC(ext_matrix_int4x3_sized) -glmCreateTestGTC(ext_matrix_int4x4_sized) -glmCreateTestGTC(ext_matrix_uint2x2_sized) -glmCreateTestGTC(ext_matrix_uint2x3_sized) -glmCreateTestGTC(ext_matrix_uint2x4_sized) -glmCreateTestGTC(ext_matrix_uint3x2_sized) -glmCreateTestGTC(ext_matrix_uint3x3_sized) -glmCreateTestGTC(ext_matrix_uint3x4_sized) -glmCreateTestGTC(ext_matrix_uint4x2_sized) -glmCreateTestGTC(ext_matrix_uint4x3_sized) -glmCreateTestGTC(ext_matrix_uint4x4_sized) -glmCreateTestGTC(ext_quaternion_common) -glmCreateTestGTC(ext_quaternion_exponential) -glmCreateTestGTC(ext_quaternion_geometric) -glmCreateTestGTC(ext_quaternion_relational) -glmCreateTestGTC(ext_quaternion_transform) -glmCreateTestGTC(ext_quaternion_trigonometric) -glmCreateTestGTC(ext_quaternion_type) -glmCreateTestGTC(ext_scalar_common) -glmCreateTestGTC(ext_scalar_constants) -glmCreateTestGTC(ext_scalar_int_sized) -glmCreateTestGTC(ext_scalar_uint_sized) -glmCreateTestGTC(ext_scalar_integer) -glmCreateTestGTC(ext_scalar_ulp) -glmCreateTestGTC(ext_scalar_reciprocal) -glmCreateTestGTC(ext_scalar_relational) -glmCreateTestGTC(ext_vec1) -glmCreateTestGTC(ext_vector_bool1) -glmCreateTestGTC(ext_vector_common) -glmCreateTestGTC(ext_vector_iec559) -glmCreateTestGTC(ext_vector_int1_sized) -glmCreateTestGTC(ext_vector_int2_sized) -glmCreateTestGTC(ext_vector_int3_sized) -glmCreateTestGTC(ext_vector_int4_sized) -glmCreateTestGTC(ext_vector_integer) -glmCreateTestGTC(ext_vector_integer_sized) -glmCreateTestGTC(ext_vector_uint1_sized) -glmCreateTestGTC(ext_vector_uint2_sized) -glmCreateTestGTC(ext_vector_uint3_sized) -glmCreateTestGTC(ext_vector_uint4_sized) -glmCreateTestGTC(ext_vector_reciprocal) -glmCreateTestGTC(ext_vector_relational) -glmCreateTestGTC(ext_vector_ulp) - diff --git a/3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp b/3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp deleted file mode 100644 index ca84c19..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int main() -{ - int Error = 0; - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_common.cpp b/3rdparty/glm/source/test/ext/ext_matrix_common.cpp deleted file mode 100644 index df0c3fe..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_common.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#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; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp deleted file mode 100644 index 93b6e86..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::i8mat2x2) == 4, "int8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::i16mat2x2) == 8, "int16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::i32mat2x2) == 16, "int32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::i64mat2x2) == 32, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat2x2) < sizeof(glm::i16mat2x2) ? 0 : 1; - Error += sizeof(glm::i16mat2x2) < sizeof(glm::i32mat2x2) ? 0 : 1; - Error += sizeof(glm::i32mat2x2) < sizeof(glm::i64mat2x2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp deleted file mode 100644 index 058f57b..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat2x3) == 6, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat2x3) == 12, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat2x3) == 24, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat2x3) == 48, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat2x3) < sizeof(glm::i16mat2x3) ? 0 : 1; - Error += sizeof(glm::i16mat2x3) < sizeof(glm::i32mat2x3) ? 0 : 1; - Error += sizeof(glm::i32mat2x3) < sizeof(glm::i64mat2x3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp deleted file mode 100644 index c20198d..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat2x4) == 8, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat2x4) == 16, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat2x4) == 32, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat2x4) == 64, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat2x4) < sizeof(glm::i16mat2x4) ? 0 : 1; - Error += sizeof(glm::i16mat2x4) < sizeof(glm::i32mat2x4) ? 0 : 1; - Error += sizeof(glm::i32mat2x4) < sizeof(glm::i64mat2x4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp deleted file mode 100644 index 1d14029..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat3x2) == 6, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat3x2) == 12, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat3x2) == 24, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat3x2) == 48, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat3x2) < sizeof(glm::i16mat3x2) ? 0 : 1; - Error += sizeof(glm::i16mat3x2) < sizeof(glm::i32mat3x2) ? 0 : 1; - Error += sizeof(glm::i32mat3x2) < sizeof(glm::i64mat3x2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp deleted file mode 100644 index d82836c..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat3x3) == 9, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat3x3) == 18, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat3x3) == 36, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat3x3) == 72, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat3x3) < sizeof(glm::i16mat3x3) ? 0 : 1; - Error += sizeof(glm::i16mat3x3) < sizeof(glm::i32mat3x3) ? 0 : 1; - Error += sizeof(glm::i32mat3x3) < sizeof(glm::i64mat3x3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp deleted file mode 100644 index 52b7d52..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat3x4) == 12, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat3x4) == 24, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat3x4) == 48, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat3x4) == 96, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat3x4) < sizeof(glm::i16mat3x4) ? 0 : 1; - Error += sizeof(glm::i16mat3x4) < sizeof(glm::i32mat3x4) ? 0 : 1; - Error += sizeof(glm::i32mat3x4) < sizeof(glm::i64mat3x4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp deleted file mode 100644 index 3c4566f..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat4x2) == 8, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat4x2) == 16, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat4x2) == 32, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat4x2) == 64, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat4x2) < sizeof(glm::i16mat4x2) ? 0 : 1; - Error += sizeof(glm::i16mat4x2) < sizeof(glm::i32mat4x2) ? 0 : 1; - Error += sizeof(glm::i32mat4x2) < sizeof(glm::i64mat4x2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp deleted file mode 100644 index fb882af..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat4x3) == 12, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat4x3) == 24, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat4x3) == 48, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat4x3) == 96, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat4x3) < sizeof(glm::i16mat4x3) ? 0 : 1; - Error += sizeof(glm::i16mat4x3) < sizeof(glm::i32mat4x3) ? 0 : 1; - Error += sizeof(glm::i32mat4x3) < sizeof(glm::i64mat4x3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp deleted file mode 100644 index 02769ea..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8mat4x4) == 16, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16mat4x4) == 32, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32mat4x4) == 64, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64mat4x4) == 128, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8mat4x4) < sizeof(glm::i16mat4x4) ? 0 : 1; - Error += sizeof(glm::i16mat4x4) < sizeof(glm::i32mat4x4) ? 0 : 1; - Error += sizeof(glm::i32mat4x4) < sizeof(glm::i64mat4x4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_integer.cpp b/3rdparty/glm/source/test/ext/ext_matrix_integer.cpp deleted file mode 100644 index c26d557..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_integer.cpp +++ /dev/null @@ -1,237 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace glm; - -int test_matrixCompMult() -{ - int Error = 0; - - { - imat2 m(0, 1, 2, 3); - imat2 n = matrixCompMult(m, m); - imat2 expected = imat2(0, 1, 4, 9); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat2x3 m(0, 1, 2, 3, 4, 5); - imat2x3 n = matrixCompMult(m, m); - imat2x3 expected = imat2x3(0, 1, 4, 9, 16, 25); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat2x4 m(0, 1, 2, 3, 4, 5, 6, 7); - imat2x4 n = matrixCompMult(m, m); - imat2x4 expected = imat2x4(0, 1, 4, 9, 16, 25, 36, 49); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8); - imat3 n = matrixCompMult(m, m); - imat3 expected = imat3(0, 1, 4, 9, 16, 25, 36, 49, 64); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat3x2 m(0, 1, 2, 3, 4, 5); - imat3x2 n = matrixCompMult(m, m); - imat3x2 expected = imat3x2(0, 1, 4, 9, 16, 25); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - imat3x4 n = matrixCompMult(m, m); - imat3x4 expected = imat3x4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); - imat4 n = matrixCompMult(m, m); - imat4 expected = imat4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat4x2 m(0, 1, 2, 3, 4, 5, 6, 7); - imat4x2 n = matrixCompMult(m, m); - imat4x2 expected = imat4x2(0, 1, 4, 9, 16, 25, 36, 49); - Error += all(equal(n, expected)) ? 0 : 1; - } - - { - imat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - imat4x3 n = matrixCompMult(m, m); - imat4x3 expected = imat4x3(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121); - Error += all(equal(n, expected)) ? 0 : 1; - } - - return Error; -} - -int test_outerProduct() -{ - int Error = 0; - - { - glm::imat2x2 const m = glm::outerProduct(glm::ivec2(1), glm::ivec2(1)); - Error += all(equal(m, glm::imat2x2(1, 1, 1, 1))) ? 0 : 1; - } - { - glm::imat2x3 const m = glm::outerProduct(glm::ivec3(1), glm::ivec2(1)); - Error += all(equal(m, glm::imat2x3(1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - { - glm::imat2x4 const m = glm::outerProduct(glm::ivec4(1), glm::ivec2(1)); - Error += all(equal(m, glm::imat2x4(1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - - { - glm::imat3x2 const m = glm::outerProduct(glm::ivec2(1), glm::ivec3(1)); - Error += all(equal(m, glm::imat3x2(1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - { - glm::imat3x3 const m = glm::outerProduct(glm::ivec3(1), glm::ivec3(1)); - Error += all(equal(m, glm::imat3x3(1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - { - glm::imat3x4 const m = glm::outerProduct(glm::ivec4(1), glm::ivec3(1)); - Error += all(equal(m, glm::imat3x4(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - - - { - glm::imat4x2 const m = glm::outerProduct(glm::ivec2(1), glm::ivec4(1)); - Error += all(equal(m, glm::imat4x2(1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - { - glm::imat4x3 const m = glm::outerProduct(glm::ivec3(1), glm::ivec4(1)); - Error += all(equal(m, glm::imat4x3(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - { - glm::imat4x4 const m = glm::outerProduct(glm::ivec4(1), glm::ivec4(1)); - Error += all(equal(m, glm::imat4x4(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1; - } - - return Error; -} - -int test_transpose() -{ - int Error = 0; - - { - imat2 const m(0, 1, 2, 3); - imat2 const t = transpose(m); - imat2 const expected = imat2(0, 2, 1, 3); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat2x3 m(0, 1, 2, 3, 4, 5); - imat3x2 t = transpose(m); - imat3x2 const expected = imat3x2(0, 3, 1, 4, 2, 5); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat2x4 m(0, 1, 2, 3, 4, 5, 6, 7); - imat4x2 t = transpose(m); - imat4x2 const expected = imat4x2(0, 4, 1, 5, 2, 6, 3, 7); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8); - imat3 t = transpose(m); - imat3 const expected = imat3(0, 3, 6, 1, 4, 7, 2, 5, 8); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat3x2 m(0, 1, 2, 3, 4, 5); - imat2x3 t = transpose(m); - imat2x3 const expected = imat2x3(0, 2, 4, 1, 3, 5); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - imat4x3 t = transpose(m); - imat4x3 const expected = imat4x3(0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); - imat4 t = transpose(m); - imat4 const expected = imat4(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat4x2 m(0, 1, 2, 3, 4, 5, 6, 7); - imat2x4 t = transpose(m); - imat2x4 const expected = imat2x4(0, 2, 4, 6, 1, 3, 5, 7); - Error += all(equal(t, expected)) ? 0 : 1; - } - - { - imat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - imat3x4 t = transpose(m); - imat3x4 const expected = imat3x4(0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11); - Error += all(equal(t, expected)) ? 0 : 1; - } - - return Error; -} - -int test_determinant() -{ - int Error = 0; - - { - imat2 const m(1, 1, 1, 1); - int const t = determinant(m); - Error += t == 0 ? 0 : 1; - } - - { - imat3 m(1, 1, 1, 1, 1, 1, 1, 1, 1); - int t = determinant(m); - Error += t == 0 ? 0 : 1; - } - - { - imat4 m(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); - int t = determinant(m); - Error += t == 0 ? 0 : 1; - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_matrixCompMult(); - Error += test_outerProduct(); - Error += test_transpose(); - Error += test_determinant(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_projection.cpp b/3rdparty/glm/source/test/ext/ext_matrix_projection.cpp deleted file mode 100644 index 88f6ae9..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_projection.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int main() -{ - int Error = 0; - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_relational.cpp b/3rdparty/glm/source/test/ext/ext_matrix_relational.cpp deleted file mode 100644 index 64c0dae..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_relational.cpp +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -static int test_equal() -{ - typedef typename matType::value_type valType; - - valType const Epsilon = static_cast(0.001f); - valType const One = static_cast(1); - valType const Two = static_cast(2); - - int Error = 0; - - Error += glm::all(glm::equal(matType(One), matType(One), Epsilon)) ? 0 : 1; - Error += glm::all(glm::equal(matType(One), matType(Two), vecType(Epsilon))) ? 1 : 0; - - return Error; -} - -template -static int test_notEqual() -{ - typedef typename matType::value_type valType; - - valType const Epsilon = static_cast(0.001f); - valType const One = static_cast(1); - valType const Two = static_cast(2); - - int Error = 0; - - Error += !glm::any(glm::notEqual(matType(One), matType(One), Epsilon)) ? 0 : 1; - Error += !glm::any(glm::notEqual(matType(One), matType(Two), vecType(Epsilon))) ? 1 : 0; - - return Error; -} - - -template -static int test_equal_ulps() -{ - typedef glm::mat<4, 4, T, glm::defaultp> mat4; - - T const One(1); - mat4 const Ones(1); - - int Error = 0; - - T const ULP1Plus = glm::nextFloat(One); - Error += glm::all(glm::equal(Ones, mat4(ULP1Plus), 1)) ? 0 : 1; - - T const ULP2Plus = glm::nextFloat(ULP1Plus); - Error += !glm::all(glm::equal(Ones, mat4(ULP2Plus), 1)) ? 0 : 1; - - T const ULP1Minus = glm::prevFloat(One); - Error += glm::all(glm::equal(Ones, mat4(ULP1Minus), 1)) ? 0 : 1; - - T const ULP2Minus = glm::prevFloat(ULP1Minus); - Error += !glm::all(glm::equal(Ones, mat4(ULP2Minus), 1)) ? 0 : 1; - - return Error; -} - -template -static int test_notEqual_ulps() -{ - typedef glm::mat<4, 4, T, glm::defaultp> mat4; - - T const One(1); - mat4 const Ones(1); - - int Error = 0; - - T const ULP1Plus = glm::nextFloat(One); - Error += !glm::all(glm::notEqual(Ones, mat4(ULP1Plus), 1)) ? 0 : 1; - - T const ULP2Plus = glm::nextFloat(ULP1Plus); - Error += glm::all(glm::notEqual(Ones, mat4(ULP2Plus), 1)) ? 0 : 1; - - T const ULP1Minus = glm::prevFloat(One); - Error += !glm::all(glm::notEqual(Ones, mat4(ULP1Minus), 1)) ? 0 : 1; - - T const ULP2Minus = glm::prevFloat(ULP1Minus); - Error += glm::all(glm::notEqual(Ones, mat4(ULP2Minus), 1)) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_equal_ulps(); - Error += test_equal_ulps(); - Error += test_notEqual_ulps(); - Error += test_notEqual_ulps(); - - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_transform.cpp b/3rdparty/glm/source/test/ext/ext_matrix_transform.cpp deleted file mode 100644 index cf653b7..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_transform.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -#include -#include -#include -#include - -static int test_translate() -{ - int Error = 0; - - glm::mat4 const M(1.0f); - glm::vec3 const V(1.0f); - - glm::mat4 const T = glm::translate(M, V); - Error += glm::all(glm::equal(T[3], glm::vec4(1.0f), glm::epsilon())) ? 0 : 1; - - return Error; -} - -static int test_scale() -{ - int Error = 0; - - glm::mat4 const M(1.0f); - glm::vec3 const V(2.0f); - - glm::mat4 const S = glm::scale(M, V); - glm::mat4 const R = glm::mat4( - glm::vec4(2, 0, 0, 0), - glm::vec4(0, 2, 0, 0), - glm::vec4(0, 0, 2, 0), - glm::vec4(0, 0, 0, 1)); - Error += glm::all(glm::equal(S, R, glm::epsilon())) ? 0 : 1; - - return Error; -} - -static int test_rotate() -{ - int Error = 0; - - glm::vec4 const A(1.0f, 0.0f, 0.0f, 1.0f); - - glm::mat4 const R = glm::rotate(glm::mat4(1.0f), glm::radians(90.f), glm::vec3(0, 0, 1)); - glm::vec4 const B = R * A; - Error += glm::all(glm::equal(B, glm::vec4(0.0f, 1.0f, 0.0f, 1.0f), 0.0001f)) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_translate(); - Error += test_scale(); - Error += test_rotate(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp deleted file mode 100644 index a9bd49c..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::u8mat2x2) == 4, "uint8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::u16mat2x2) == 8, "uint16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::u32mat2x2) == 16, "uint32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::u64mat2x2) == 32, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat2x2) < sizeof(glm::u16mat2x2) ? 0 : 1; - Error += sizeof(glm::u16mat2x2) < sizeof(glm::u32mat2x2) ? 0 : 1; - Error += sizeof(glm::u32mat2x2) < sizeof(glm::u64mat2x2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp deleted file mode 100644 index 0b75893..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat2x3) == 6, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat2x3) == 12, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat2x3) == 24, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat2x3) == 48, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat2x3) < sizeof(glm::u16mat2x3) ? 0 : 1; - Error += sizeof(glm::u16mat2x3) < sizeof(glm::u32mat2x3) ? 0 : 1; - Error += sizeof(glm::u32mat2x3) < sizeof(glm::u64mat2x3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp deleted file mode 100644 index 84af4dd..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat2x4) == 8, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat2x4) == 16, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat2x4) == 32, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat2x4) == 64, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat2x4) < sizeof(glm::u16mat2x4) ? 0 : 1; - Error += sizeof(glm::u16mat2x4) < sizeof(glm::u32mat2x4) ? 0 : 1; - Error += sizeof(glm::u32mat2x4) < sizeof(glm::u64mat2x4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp deleted file mode 100644 index 3c035e2..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat3x2) == 6, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat3x2) == 12, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat3x2) == 24, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat3x2) == 48, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat3x2) < sizeof(glm::u16mat3x2) ? 0 : 1; - Error += sizeof(glm::u16mat3x2) < sizeof(glm::u32mat3x2) ? 0 : 1; - Error += sizeof(glm::u32mat3x2) < sizeof(glm::u64mat3x2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp deleted file mode 100644 index 64384ed..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat3x3) == 9, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat3x3) == 18, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat3x3) == 36, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat3x3) == 72, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat3x3) < sizeof(glm::u16mat3x3) ? 0 : 1; - Error += sizeof(glm::u16mat3x3) < sizeof(glm::u32mat3x3) ? 0 : 1; - Error += sizeof(glm::u32mat3x3) < sizeof(glm::u64mat3x3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp deleted file mode 100644 index 7f743df..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat3x4) == 12, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat3x4) == 24, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat3x4) == 48, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat3x4) == 96, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat3x4) < sizeof(glm::u16mat3x4) ? 0 : 1; - Error += sizeof(glm::u16mat3x4) < sizeof(glm::u32mat3x4) ? 0 : 1; - Error += sizeof(glm::u32mat3x4) < sizeof(glm::u64mat3x4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp deleted file mode 100644 index 2b4453f..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat4x2) == 8, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat4x2) == 16, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat4x2) == 32, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat4x2) == 64, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat4x2) < sizeof(glm::u16mat4x2) ? 0 : 1; - Error += sizeof(glm::u16mat4x2) < sizeof(glm::u32mat4x2) ? 0 : 1; - Error += sizeof(glm::u32mat4x2) < sizeof(glm::u64mat4x2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp deleted file mode 100644 index 2820bde..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat4x3) == 12, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat4x3) == 24, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat4x3) == 48, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat4x3) == 96, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat4x3) < sizeof(glm::u16mat4x3) ? 0 : 1; - Error += sizeof(glm::u16mat4x3) < sizeof(glm::u32mat4x3) ? 0 : 1; - Error += sizeof(glm::u32mat4x3) < sizeof(glm::u64mat4x3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp deleted file mode 100644 index 8f9e239..0000000 --- a/3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8mat4x4) == 16, "uint8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16mat4x4) == 32, "uint16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32mat4x4) == 64, "uint32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64mat4x4) == 128, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8mat4x4) < sizeof(glm::u16mat4x4) ? 0 : 1; - Error += sizeof(glm::u16mat4x4) < sizeof(glm::u32mat4x4) ? 0 : 1; - Error += sizeof(glm::u32mat4x4) < sizeof(glm::u64mat4x4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_common.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_common.cpp deleted file mode 100644 index 861aa65..0000000 --- a/3rdparty/glm/source/test/ext/ext_quaternion_common.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -static int test_conjugate() -{ - int Error = 0; - - glm::quat const A(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0)); - glm::quat const C = glm::conjugate(A); - Error += glm::any(glm::notEqual(A, C, glm::epsilon())) ? 0 : 1; - - glm::quat const B = glm::conjugate(C); - Error += glm::all(glm::equal(A, B, glm::epsilon())) ? 0 : 1; - - return Error; -} - -static int test_mix() -{ - int Error = 0; - - glm::quat const Q1(glm::vec3(1, 0, 0), glm::vec3(1, 0, 0)); - glm::quat const Q2(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0)); - - { - glm::quat const Q3 = glm::mix(Q1, Q2, 0.5f); - float const F3 = glm::degrees(glm::angle(Q3)); - Error += glm::equal(F3, 45.0f, 0.001f) ? 0 : 1; - - glm::quat const Q4 = glm::mix(Q2, Q1, 0.5f); - float const F4 = glm::degrees(glm::angle(Q4)); - Error += glm::equal(F4, 45.0f, 0.001f) ? 0 : 1; - } - - { - glm::quat const Q3 = glm::slerp(Q1, Q2, 0.5f); - float const F3 = glm::degrees(glm::angle(Q3)); - Error += glm::equal(F3, 45.0f, 0.001f) ? 0 : 1; - - glm::quat const Q4 = glm::slerp(Q2, Q1, 0.5f); - float const F4 = glm::degrees(glm::angle(Q4)); - Error += glm::equal(F4, 45.0f, 0.001f) ? 0 : 1; - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_conjugate(); - Error += test_mix(); - - return Error; -} 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; -} diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp deleted file mode 100644 index 73b5dea..0000000 --- a/3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -float const Epsilon = 0.001f; - -static int test_length() -{ - int Error = 0; - - { - float const A = glm::length(glm::quat(1, 0, 0, 0)); - Error += glm::equal(A, 1.0f, Epsilon) ? 0 : 1; - } - - { - float const A = glm::length(glm::quat(1, glm::vec3(0))); - Error += glm::equal(A, 1.0f, Epsilon) ? 0 : 1; - } - - { - float const A = glm::length(glm::quat(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0))); - Error += glm::equal(A, 1.0f, Epsilon) ? 0 : 1; - } - - return Error; -} - -static int test_normalize() -{ - int Error = 0; - - { - glm::quat const A = glm::quat(1, 0, 0, 0); - glm::quat const N = glm::normalize(A); - Error += glm::all(glm::equal(A, N, Epsilon)) ? 0 : 1; - } - - { - glm::quat const A = glm::quat(1, glm::vec3(0)); - glm::quat const N = glm::normalize(A); - Error += glm::all(glm::equal(A, N, Epsilon)) ? 0 : 1; - } - - return Error; -} - -static int test_dot() -{ - int Error = 0; - - { - glm::quat const A = glm::quat(1, 0, 0, 0); - glm::quat const B = glm::quat(1, 0, 0, 0); - float const C = glm::dot(A, B); - Error += glm::equal(C, 1.0f, Epsilon) ? 0 : 1; - } - - return Error; -} - -static int test_cross() -{ - int Error = 0; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_length(); - Error += test_normalize(); - Error += test_dot(); - Error += test_cross(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp deleted file mode 100644 index 7f51fdc..0000000 --- a/3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -static int test_equal() -{ - int Error = 0; - - quaType const Q(1, 0, 0, 0); - quaType const P(1, 0, 0, 0); - Error += glm::all(glm::equal(Q, P, glm::epsilon())) ? 0 : 1; - - return Error; -} - -template -static int test_notEqual() -{ - int Error = 0; - - quaType const Q(1, 0, 0, 0); - quaType const P(1, 0, 0, 0); - Error += glm::any(glm::notEqual(Q, P, glm::epsilon())) ? 1 : 0; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp deleted file mode 100644 index fefe88e..0000000 --- a/3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include -#include -#include - -#define GLM_ENABLE_EXPERIMENTAL -#include - -static int test_lookAt() -{ - int Error(0); - - glm::vec3 eye(0.0f); - glm::vec3 center(1.1f, -2.0f, 3.1416f); - glm::vec3 up(-0.17f, 7.23f, -1.744f); - - glm::quat test_quat = glm::quatLookAt(glm::normalize(center - eye), up); - glm::quat test_mat = glm::conjugate(glm::quat_cast(glm::lookAt(eye, center, up))); - - Error += static_cast(glm::abs(glm::length(test_quat) - 1.0f) > glm::epsilon()); - Error += static_cast(glm::min(glm::length(test_quat + (-test_mat)), glm::length(test_quat + test_mat)) > glm::epsilon()); - - // Test left-handed implementation - glm::quat test_quatLH = glm::quatLookAtLH(glm::normalize(center - eye), up); - glm::quat test_matLH = glm::conjugate(glm::quat_cast(glm::lookAtLH(eye, center, up))); - Error += static_cast(glm::abs(glm::length(test_quatLH) - 1.0f) > glm::epsilon()); - Error += static_cast(glm::min(glm::length(test_quatLH - test_matLH), glm::length(test_quatLH + test_matLH)) > glm::epsilon()); - - // Test right-handed implementation - glm::quat test_quatRH = glm::quatLookAtRH(glm::normalize(center - eye), up); - glm::quat test_matRH = glm::conjugate(glm::quat_cast(glm::lookAtRH(eye, center, up))); - Error += static_cast(glm::abs(glm::length(test_quatRH) - 1.0f) > glm::epsilon()); - Error += static_cast(glm::min(glm::length(test_quatRH - test_matRH), glm::length(test_quatRH + test_matRH)) > glm::epsilon()); - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_lookAt(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp deleted file mode 100644 index d237125..0000000 --- a/3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include -#include - -float const Epsilon = 0.001f; - -static int test_angle() -{ - int Error = 0; - - { - glm::quat const Q = glm::quat(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0)); - float const A = glm::degrees(glm::angle(Q)); - Error += glm::equal(A, 90.0f, Epsilon) ? 0 : 1; - } - - { - glm::quat const Q = glm::quat(glm::vec3(0, 1, 0), glm::vec3(1, 0, 0)); - float const A = glm::degrees(glm::angle(Q)); - Error += glm::equal(A, 90.0f, Epsilon) ? 0 : 1; - } - - { - glm::quat const Q = glm::angleAxis(glm::two_pi() - 1.0f, glm::vec3(1, 0, 0)); - float const A = glm::angle(Q); - Error += glm::equal(A, 1.0f, Epsilon) ? 1 : 0; - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_angle(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_type.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_type.cpp deleted file mode 100644 index 7e61149..0000000 --- a/3rdparty/glm/source/test/ext/ext_quaternion_type.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -static int test_ctr() -{ - int Error(0); - -# if GLM_HAS_TRIVIAL_QUERIES - // Error += std::is_trivially_default_constructible::value ? 0 : 1; - // Error += std::is_trivially_default_constructible::value ? 0 : 1; - // Error += std::is_trivially_copy_assignable::value ? 0 : 1; - // Error += std::is_trivially_copy_assignable::value ? 0 : 1; - Error += std::is_trivially_copyable::value ? 0 : 1; - Error += std::is_trivially_copyable::value ? 0 : 1; - - Error += std::is_copy_constructible::value ? 0 : 1; - Error += std::is_copy_constructible::value ? 0 : 1; -# endif - -# if GLM_HAS_INITIALIZER_LISTS - { - glm::quat A{0, 1, 2, 3}; - - std::vector B{ - {0, 1, 2, 3}, - {0, 1, 2, 3}}; - } -# endif//GLM_HAS_INITIALIZER_LISTS - - return Error; -} - -static int test_two_axis_ctr() -{ - int Error = 0; - - glm::quat const q1(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0)); - glm::vec3 const v1 = q1 * glm::vec3(1, 0, 0); - Error += glm::all(glm::equal(v1, glm::vec3(0, 1, 0), 0.0001f)) ? 0 : 1; - - glm::quat const q2 = q1 * q1; - glm::vec3 const v2 = q2 * glm::vec3(1, 0, 0); - Error += glm::all(glm::equal(v2, glm::vec3(-1, 0, 0), 0.0001f)) ? 0 : 1; - - glm::quat const q3(glm::vec3(1, 0, 0), glm::vec3(-1, 0, 0)); - glm::vec3 const v3 = q3 * glm::vec3(1, 0, 0); - Error += glm::all(glm::equal(v3, glm::vec3(-1, 0, 0), 0.0001f)) ? 0 : 1; - - glm::quat const q4(glm::vec3(0, 1, 0), glm::vec3(0, -1, 0)); - glm::vec3 const v4 = q4 * glm::vec3(0, 1, 0); - Error += glm::all(glm::equal(v4, glm::vec3(0, -1, 0), 0.0001f)) ? 0 : 1; - - glm::quat const q5(glm::vec3(0, 0, 1), glm::vec3(0, 0, -1)); - glm::vec3 const v5 = q5 * glm::vec3(0, 0, 1); - Error += glm::all(glm::equal(v5, glm::vec3(0, 0, -1), 0.0001f)) ? 0 : 1; - - return Error; -} - -static int test_size() -{ - int Error = 0; - - std::size_t const A = sizeof(glm::quat); - Error += 16 == A ? 0 : 1; - std::size_t const B = sizeof(glm::dquat); - Error += 32 == B ? 0 : 1; - Error += glm::quat().length() == 4 ? 0 : 1; - Error += glm::dquat().length() == 4 ? 0 : 1; - Error += glm::quat::length() == 4 ? 0 : 1; - Error += glm::dquat::length() == 4 ? 0 : 1; - - return Error; -} - -static int test_precision() -{ - int Error = 0; - - Error += sizeof(glm::lowp_quat) <= sizeof(glm::mediump_quat) ? 0 : 1; - Error += sizeof(glm::mediump_quat) <= sizeof(glm::highp_quat) ? 0 : 1; - - return Error; -} - -static int test_constexpr() -{ -#if GLM_HAS_CONSTEXPR - static_assert(glm::quat::length() == 4, "GLM: Failed constexpr"); - static_assert(glm::quat(1.0f, glm::vec3(0.0f)).w > 0.0f, "GLM: Failed constexpr"); -#endif - - return 0; -} - -int main() -{ - int Error = 0; - - Error += test_ctr(); - Error += test_two_axis_ctr(); - Error += test_size(); - Error += test_precision(); - Error += test_constexpr(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_common.cpp b/3rdparty/glm/source/test/ext/ext_scalar_common.cpp deleted file mode 100644 index 917a242..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_common.cpp +++ /dev/null @@ -1,360 +0,0 @@ -#include -#include -#include -#include - -#if ((GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC)) -# define GLM_NAN(T) NAN -#else -# define GLM_NAN(T) (static_cast(0.0f) / static_cast(0.0f)) -#endif - -template -static int test_min() -{ - int Error = 0; - - T const N = static_cast(0); - T const B = static_cast(1); - Error += glm::equal(glm::min(N, B), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(B, N), N, glm::epsilon()) ? 0 : 1; - - T const C = static_cast(2); - Error += glm::equal(glm::min(N, B, C), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(B, N, C), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(C, N, B), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(C, B, N), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(B, C, N), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(N, C, B), N, glm::epsilon()) ? 0 : 1; - - T const D = static_cast(3); - Error += glm::equal(glm::min(D, N, B, C), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(B, D, N, C), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(C, N, D, B), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(C, B, D, N), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(B, C, N, D), N, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::min(N, C, B, D), N, glm::epsilon()) ? 0 : 1; - - return Error; -} - -template -static int test_min_nan() -{ - int Error = 0; - - T const B = static_cast(1); - T const N = static_cast(GLM_NAN(T)); - Error += glm::isnan(glm::min(N, B)) ? 0 : 1; - Error += !glm::isnan(glm::min(B, N)) ? 0 : 1; - - T const C = static_cast(2); - Error += glm::isnan(glm::min(N, B, C)) ? 0 : 1; - Error += !glm::isnan(glm::min(B, N, C)) ? 0 : 1; - Error += !glm::isnan(glm::min(C, N, B)) ? 0 : 1; - Error += !glm::isnan(glm::min(C, B, N)) ? 0 : 1; - Error += !glm::isnan(glm::min(B, C, N)) ? 0 : 1; - Error += glm::isnan(glm::min(N, C, B)) ? 0 : 1; - - T const D = static_cast(3); - Error += !glm::isnan(glm::min(D, N, B, C)) ? 0 : 1; - Error += !glm::isnan(glm::min(B, D, N, C)) ? 0 : 1; - Error += !glm::isnan(glm::min(C, N, D, B)) ? 0 : 1; - Error += !glm::isnan(glm::min(C, B, D, N)) ? 0 : 1; - Error += !glm::isnan(glm::min(B, C, N, D)) ? 0 : 1; - Error += glm::isnan(glm::min(N, C, B, D)) ? 0 : 1; - - return Error; -} - -template -static int test_max() -{ - int Error = 0; - - T const N = static_cast(0); - T const B = static_cast(1); - Error += glm::equal(glm::max(N, B), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(B, N), B, glm::epsilon()) ? 0 : 1; - - T const C = static_cast(2); - Error += glm::equal(glm::max(N, B, C), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(B, N, C), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(C, N, B), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(C, B, N), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(B, C, N), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(N, C, B), C, glm::epsilon()) ? 0 : 1; - - T const D = static_cast(3); - Error += glm::equal(glm::max(D, N, B, C), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(B, D, N, C), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(C, N, D, B), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(C, B, D, N), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(B, C, N, D), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::max(N, C, B, D), D, glm::epsilon()) ? 0 : 1; - - return Error; -} - -template -static int test_max_nan() -{ - int Error = 0; - - T const B = static_cast(1); - T const N = static_cast(GLM_NAN(T)); - Error += glm::isnan(glm::max(N, B)) ? 0 : 1; - Error += !glm::isnan(glm::max(B, N)) ? 0 : 1; - - T const C = static_cast(2); - Error += glm::isnan(glm::max(N, B, C)) ? 0 : 1; - Error += !glm::isnan(glm::max(B, N, C)) ? 0 : 1; - Error += !glm::isnan(glm::max(C, N, B)) ? 0 : 1; - Error += !glm::isnan(glm::max(C, B, N)) ? 0 : 1; - Error += !glm::isnan(glm::max(B, C, N)) ? 0 : 1; - Error += glm::isnan(glm::max(N, C, B)) ? 0 : 1; - - T const D = static_cast(3); - Error += !glm::isnan(glm::max(D, N, B, C)) ? 0 : 1; - Error += !glm::isnan(glm::max(B, D, N, C)) ? 0 : 1; - Error += !glm::isnan(glm::max(C, N, D, B)) ? 0 : 1; - Error += !glm::isnan(glm::max(C, B, D, N)) ? 0 : 1; - Error += !glm::isnan(glm::max(B, C, N, D)) ? 0 : 1; - Error += glm::isnan(glm::max(N, C, B, D)) ? 0 : 1; - - return Error; -} - -template -static int test_fmin() -{ - int Error = 0; - - T const B = static_cast(1); - T const N = static_cast(GLM_NAN(T)); - Error += glm::equal(glm::fmin(N, B), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(B, N), B, glm::epsilon()) ? 0 : 1; - - T const C = static_cast(2); - Error += glm::equal(glm::fmin(N, B, C), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(B, N, C), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(C, N, B), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(C, B, N), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(B, C, N), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(N, C, B), B, glm::epsilon()) ? 0 : 1; - - T const D = static_cast(3); - Error += glm::equal(glm::fmin(D, N, B, C), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(B, D, N, C), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(C, N, D, B), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(C, B, D, N), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(B, C, N, D), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmin(N, C, B, D), B, glm::epsilon()) ? 0 : 1; - - return Error; -} - -template -static int test_fmax() -{ - int Error = 0; - - T const B = static_cast(1); - T const N = static_cast(GLM_NAN(T)); - Error += glm::equal(glm::fmax(N, B), B, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(B, N), B, glm::epsilon()) ? 0 : 1; - - T const C = static_cast(2); - Error += glm::equal(glm::fmax(N, B, C), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(B, N, C), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(C, N, B), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(C, B, N), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(B, C, N), C, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(N, C, B), C, glm::epsilon()) ? 0 : 1; - - T const D = static_cast(3); - Error += glm::equal(glm::fmax(D, N, B, C), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(B, D, N, C), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(C, N, D, B), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(C, B, D, N), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(B, C, N, D), D, glm::epsilon()) ? 0 : 1; - Error += glm::equal(glm::fmax(N, C, B, D), D, glm::epsilon()) ? 0 : 1; - - return Error; -} - -static int test_clamp() -{ - int Error = 0; - - float A = glm::clamp(0.5f); - Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; - - float B = glm::clamp(0.0f); - Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; - - float C = glm::clamp(1.0f); - Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1; - - float D = glm::clamp(-0.5f); - Error += glm::equal(D, 0.0f, 0.00001f) ? 0 : 1; - - float E = glm::clamp(1.5f); - Error += glm::equal(E, 1.0f, 0.00001f) ? 0 : 1; - - return Error; -} - -static int test_repeat() -{ - int Error = 0; - - float A = glm::repeat(0.5f); - Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; - - float B = glm::repeat(0.0f); - Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; - - float C = glm::repeat(1.0f); - Error += glm::equal(C, 0.0f, 0.00001f) ? 0 : 1; - - float D = glm::repeat(-0.5f); - Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; - - float E = glm::repeat(1.5f); - Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; - - float F = glm::repeat(0.9f); - Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; - - return Error; -} - -static int test_mirrorClamp() -{ - int Error = 0; - - float A = glm::mirrorClamp(0.5f); - Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; - - float B = glm::mirrorClamp(0.0f); - Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; - - float C = glm::mirrorClamp(1.1f); - Error += glm::equal(C, 0.1f, 0.00001f) ? 0 : 1; - - float D = glm::mirrorClamp(-0.5f); - Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; - - float E = glm::mirrorClamp(1.5f); - Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; - - float F = glm::mirrorClamp(0.9f); - Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; - - float G = glm::mirrorClamp(3.1f); - Error += glm::equal(G, 0.1f, 0.00001f) ? 0 : 1; - - float H = glm::mirrorClamp(-3.1f); - Error += glm::equal(H, 0.1f, 0.00001f) ? 0 : 1; - - float I = glm::mirrorClamp(-0.9f); - Error += glm::equal(I, 0.9f, 0.00001f) ? 0 : 1; - - return Error; -} - -static int test_mirrorRepeat() -{ - int Error = 0; - - float A = glm::mirrorRepeat(0.5f); - Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; - - float B = glm::mirrorRepeat(0.0f); - Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; - - float C = glm::mirrorRepeat(1.0f); - Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1; - - float D = glm::mirrorRepeat(-0.5f); - Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; - - float E = glm::mirrorRepeat(1.5f); - Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; - - float F = glm::mirrorRepeat(0.9f); - Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; - - float G = glm::mirrorRepeat(3.0f); - Error += glm::equal(G, 1.0f, 0.00001f) ? 0 : 1; - - float H = glm::mirrorRepeat(-3.0f); - Error += glm::equal(H, 1.0f, 0.00001f) ? 0 : 1; - - float I = glm::mirrorRepeat(-1.0f); - Error += glm::equal(I, 1.0f, 0.00001f) ? 0 : 1; - - return Error; -} - -static int test_iround() -{ - int Error = 0; - - for(float f = 0.0f; f < 3.1f; f += 0.05f) - { - int RoundFast = static_cast(glm::iround(f)); - int RoundSTD = static_cast(glm::round(f)); - Error += RoundFast == RoundSTD ? 0 : 1; - assert(!Error); - } - - return Error; -} - -static int test_uround() -{ - int Error = 0; - - for(float f = 0.0f; f < 3.1f; f += 0.05f) - { - int RoundFast = static_cast(glm::uround(f)); - int RoundSTD = static_cast(glm::round(f)); - Error += RoundFast == RoundSTD ? 0 : 1; - assert(!Error); - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_min(); - Error += test_min(); - Error += test_min_nan(); - Error += test_min_nan(); - - Error += test_max(); - Error += test_max(); - Error += test_max_nan(); - Error += test_max_nan(); - - Error += test_fmin(); - Error += test_fmin(); - - Error += test_fmax(); - Error += test_fmax(); - - Error += test_clamp(); - Error += test_repeat(); - Error += test_mirrorClamp(); - Error += test_mirrorRepeat(); - - Error += test_iround(); - Error += test_uround(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_constants.cpp b/3rdparty/glm/source/test/ext/ext_scalar_constants.cpp deleted file mode 100644 index 3af7099..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_constants.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include - -template -static int test_epsilon() -{ - int Error = 0; - - valType const Test = glm::epsilon(); - Error += Test > static_cast(0) ? 0 : 1; - - return Error; -} - -template -static int test_pi() -{ - int Error = 0; - - valType const Test = glm::pi(); - Error += Test > static_cast(3.14) ? 0 : 1; - Error += Test < static_cast(3.15) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_epsilon(); - Error += test_epsilon(); - Error += test_pi(); - Error += test_pi(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp b/3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp deleted file mode 100644 index b55c6ca..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform"); - static_assert(sizeof(glm::int16) == sizeof(short), "signed short size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::int32) == sizeof(int), "signed int size isn't 4 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::int8) == 1 ? 0 : 1; - Error += sizeof(glm::int16) == 2 ? 0 : 1; - Error += sizeof(glm::int32) == 4 ? 0 : 1; - Error += sizeof(glm::int64) == 8 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::int8) < sizeof(glm::int16) ? 0 : 1; - Error += sizeof(glm::int16) < sizeof(glm::int32) ? 0 : 1; - Error += sizeof(glm::int32) < sizeof(glm::int64) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_integer.cpp b/3rdparty/glm/source/test/ext/ext_scalar_integer.cpp deleted file mode 100644 index f169e8a..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_integer.cpp +++ /dev/null @@ -1,686 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#if GLM_LANG & GLM_LANG_CXX11_FLAG -#include - -namespace isPowerOfTwo -{ - template - struct type - { - genType Value; - bool Return; - }; - - int test_int16() - { - type const Data[] = - { - {0x0001, true}, - {0x0002, true}, - {0x0004, true}, - {0x0080, true}, - {0x0000, true}, - {0x0003, false} - }; - - int Error = 0; - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - bool Result = glm::isPowerOfTwo(Data[i].Value); - Error += Data[i].Return == Result ? 0 : 1; - } - - return Error; - } - - int test_uint16() - { - type const Data[] = - { - {0x0001, true}, - {0x0002, true}, - {0x0004, true}, - {0x0000, true}, - {0x0000, true}, - {0x0003, false} - }; - - int Error = 0; - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - bool Result = glm::isPowerOfTwo(Data[i].Value); - Error += Data[i].Return == Result ? 0 : 1; - } - - return Error; - } - - int test_int32() - { - type const Data[] = - { - {0x00000001, true}, - {0x00000002, true}, - {0x00000004, true}, - {0x0000000f, false}, - {0x00000000, true}, - {0x00000003, false} - }; - - int Error = 0; - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - bool Result = glm::isPowerOfTwo(Data[i].Value); - Error += Data[i].Return == Result ? 0 : 1; - } - - return Error; - } - - int test_uint32() - { - type const Data[] = - { - {0x00000001, true}, - {0x00000002, true}, - {0x00000004, true}, - {0x80000000, true}, - {0x00000000, true}, - {0x00000003, false} - }; - - int Error = 0; - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - bool Result = glm::isPowerOfTwo(Data[i].Value); - Error += Data[i].Return == Result ? 0 : 1; - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += test_int16(); - Error += test_uint16(); - Error += test_int32(); - Error += test_uint32(); - - return Error; - } -}//isPowerOfTwo - -namespace nextPowerOfTwo_advanced -{ - template - GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value) - { - genIUType tmp = Value; - genIUType result = genIUType(0); - while(tmp) - { - result = (tmp & (~tmp + 1)); // grab lowest bit - tmp &= ~result; // clear lowest bit - } - return result; - } - - template - GLM_FUNC_QUALIFIER genType nextPowerOfTwo_loop(genType value) - { - return glm::isPowerOfTwo(value) ? value : highestBitValue(value) << 1; - } - - template - struct type - { - genType Value; - genType Return; - }; - - int test_int32() - { - type const Data[] = - { - {0x0000ffff, 0x00010000}, - {-3, -4}, - {-8, -8}, - {0x00000001, 0x00000001}, - {0x00000002, 0x00000002}, - {0x00000004, 0x00000004}, - {0x00000007, 0x00000008}, - {0x0000fff0, 0x00010000}, - {0x0000f000, 0x00010000}, - {0x08000000, 0x08000000}, - {0x00000000, 0x00000000}, - {0x00000003, 0x00000004} - }; - - int Error(0); - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::int32 Result = glm::nextPowerOfTwo(Data[i].Value); - Error += Data[i].Return == Result ? 0 : 1; - } - - return Error; - } - - int test_uint32() - { - type const Data[] = - { - {0x00000001, 0x00000001}, - {0x00000002, 0x00000002}, - {0x00000004, 0x00000004}, - {0x00000007, 0x00000008}, - {0x0000ffff, 0x00010000}, - {0x0000fff0, 0x00010000}, - {0x0000f000, 0x00010000}, - {0x80000000, 0x80000000}, - {0x00000000, 0x00000000}, - {0x00000003, 0x00000004} - }; - - int Error(0); - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::uint32 Result = glm::nextPowerOfTwo(Data[i].Value); - Error += Data[i].Return == Result ? 0 : 1; - } - - return Error; - } - - int perf() - { - int Error(0); - - std::vector v; - v.resize(100000000); - - std::clock_t Timestramp0 = std::clock(); - - for(glm::uint32 i = 0, n = static_cast(v.size()); i < n; ++i) - v[i] = nextPowerOfTwo_loop(i); - - std::clock_t Timestramp1 = std::clock(); - - for(glm::uint32 i = 0, n = static_cast(v.size()); i < n; ++i) - v[i] = glm::nextPowerOfTwo(i); - - std::clock_t Timestramp2 = std::clock(); - - std::printf("nextPowerOfTwo_loop: %d clocks\n", static_cast(Timestramp1 - Timestramp0)); - std::printf("glm::nextPowerOfTwo: %d clocks\n", static_cast(Timestramp2 - Timestramp1)); - - return Error; - } - - int test() - { - int Error(0); - - Error += test_int32(); - Error += test_uint32(); - - return Error; - } -}//namespace nextPowerOfTwo_advanced - -namespace prevPowerOfTwo -{ - template - int run() - { - int Error = 0; - - T const A = glm::prevPowerOfTwo(static_cast(7)); - Error += A == static_cast(4) ? 0 : 1; - - T const B = glm::prevPowerOfTwo(static_cast(15)); - Error += B == static_cast(8) ? 0 : 1; - - T const C = glm::prevPowerOfTwo(static_cast(31)); - Error += C == static_cast(16) ? 0 : 1; - - T const D = glm::prevPowerOfTwo(static_cast(32)); - Error += D == static_cast(32) ? 0 : 1; - - return Error; - } - - int test() - { - int Error = 0; - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - return Error; - } -}//namespace prevPowerOfTwo - -namespace nextPowerOfTwo -{ - template - int run() - { - int Error = 0; - - T const A = glm::nextPowerOfTwo(static_cast(7)); - Error += A == static_cast(8) ? 0 : 1; - - T const B = glm::nextPowerOfTwo(static_cast(15)); - Error += B == static_cast(16) ? 0 : 1; - - T const C = glm::nextPowerOfTwo(static_cast(31)); - Error += C == static_cast(32) ? 0 : 1; - - T const D = glm::nextPowerOfTwo(static_cast(32)); - Error += D == static_cast(32) ? 0 : 1; - - return Error; - } - - int test() - { - int Error = 0; - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - return Error; - } -}//namespace nextPowerOfTwo - -namespace prevMultiple -{ - template - struct type - { - genIUType Source; - genIUType Multiple; - genIUType Return; - }; - - template - int run() - { - type const Data[] = - { - {8, 3, 6}, - {7, 7, 7} - }; - - int Error = 0; - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - T const Result = glm::prevMultiple(Data[i].Source, Data[i].Multiple); - Error += Data[i].Return == Result ? 0 : 1; - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - return Error; - } -}//namespace prevMultiple - -namespace nextMultiple -{ - static glm::uint const Multiples = 128; - - int perf_nextMultiple(glm::uint Samples) - { - std::vector Results(Samples * Multiples); - - std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now(); - - for(glm::uint Source = 0; Source < Samples; ++Source) - for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple) - { - Results[Source * Multiples + Multiple] = glm::nextMultiple(Source, Multiples); - } - - std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now(); - - std::printf("- glm::nextMultiple Time %d microseconds\n", static_cast(std::chrono::duration_cast(t1 - t0).count())); - - glm::uint Result = 0; - for(std::size_t i = 0, n = Results.size(); i < n; ++i) - Result += Results[i]; - - return Result > 0 ? 0 : 1; - } - - template - GLM_FUNC_QUALIFIER T nextMultipleMod(T Source, T Multiple) - { - T const Tmp = Source - static_cast(1); - return Tmp + (Multiple - (Tmp % Multiple)); - } - - int perf_nextMultipleMod(glm::uint Samples) - { - std::vector Results(Samples * Multiples); - - std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now(); - - for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple) - for (glm::uint Source = 0; Source < Samples; ++Source) - { - Results[Source * Multiples + Multiple] = nextMultipleMod(Source, Multiples); - } - - std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now(); - - std::printf("- nextMultipleMod Time %d microseconds\n", static_cast(std::chrono::duration_cast(t1 - t0).count())); - - glm::uint Result = 0; - for(std::size_t i = 0, n = Results.size(); i < n; ++i) - Result += Results[i]; - - return Result > 0 ? 0 : 1; - } - - template - GLM_FUNC_QUALIFIER T nextMultipleNeg(T Source, T Multiple) - { - if(Source > static_cast(0)) - { - T const Tmp = Source - static_cast(1); - return Tmp + (Multiple - (Tmp % Multiple)); - } - else - return Source + (-Source % Multiple); - } - - int perf_nextMultipleNeg(glm::uint Samples) - { - std::vector Results(Samples * Multiples); - - std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now(); - - for(glm::uint Source = 0; Source < Samples; ++Source) - for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple) - { - Results[Source * Multiples + Multiple] = nextMultipleNeg(Source, Multiples); - } - - std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now(); - - std::printf("- nextMultipleNeg Time %d microseconds\n", static_cast(std::chrono::duration_cast(t1 - t0).count())); - - glm::uint Result = 0; - for (std::size_t i = 0, n = Results.size(); i < n; ++i) - Result += Results[i]; - - return Result > 0 ? 0 : 1; - } - - template - GLM_FUNC_QUALIFIER T nextMultipleUFloat(T Source, T Multiple) - { - return Source + (Multiple - std::fmod(Source, Multiple)); - } - - int perf_nextMultipleUFloat(glm::uint Samples) - { - std::vector Results(Samples * Multiples); - - std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now(); - - for(glm::uint Source = 0; Source < Samples; ++Source) - for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple) - { - Results[Source * Multiples + Multiple] = nextMultipleUFloat(static_cast(Source), static_cast(Multiples)); - } - - std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now(); - - std::printf("- nextMultipleUFloat Time %d microseconds\n", static_cast(std::chrono::duration_cast(t1 - t0).count())); - - float Result = 0; - for (std::size_t i = 0, n = Results.size(); i < n; ++i) - Result += Results[i]; - - return Result > 0.0f ? 0 : 1; - } - - template - GLM_FUNC_QUALIFIER T nextMultipleFloat(T Source, T Multiple) - { - if(Source > static_cast(0)) - return Source + (Multiple - std::fmod(Source, Multiple)); - else - return Source + std::fmod(-Source, Multiple); - } - - int perf_nextMultipleFloat(glm::uint Samples) - { - std::vector Results(Samples * Multiples); - - std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now(); - - for(glm::uint Source = 0; Source < Samples; ++Source) - for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple) - { - Results[Source * Multiples + Multiple] = nextMultipleFloat(static_cast(Source), static_cast(Multiples)); - } - - std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now(); - - std::printf("- nextMultipleFloat Time %d microseconds\n", static_cast(std::chrono::duration_cast(t1 - t0).count())); - - float Result = 0; - for (std::size_t i = 0, n = Results.size(); i < n; ++i) - Result += Results[i]; - - return Result > 0.0f ? 0 : 1; - } - - template - struct type - { - genIUType Source; - genIUType Multiple; - genIUType Return; - }; - - template - int test_uint() - { - type const Data[] = - { - { 3, 4, 4 }, - { 6, 3, 6 }, - { 5, 3, 6 }, - { 7, 7, 7 }, - { 0, 1, 0 }, - { 8, 3, 9 } - }; - - int Error = 0; - - for(std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - T const Result0 = glm::nextMultiple(Data[i].Source, Data[i].Multiple); - Error += Data[i].Return == Result0 ? 0 : 1; - assert(!Error); - - T const Result1 = nextMultipleMod(Data[i].Source, Data[i].Multiple); - Error += Data[i].Return == Result1 ? 0 : 1; - assert(!Error); - } - - return Error; - } - - int perf() - { - int Error = 0; - - glm::uint const Samples = 10000; - - for(int i = 0; i < 4; ++i) - { - std::printf("Run %d :\n", i); - Error += perf_nextMultiple(Samples); - Error += perf_nextMultipleMod(Samples); - Error += perf_nextMultipleNeg(Samples); - Error += perf_nextMultipleUFloat(Samples); - Error += perf_nextMultipleFloat(Samples); - std::printf("\n"); - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += test_uint(); - Error += test_uint(); - Error += test_uint(); - Error += test_uint(); - - Error += test_uint(); - Error += test_uint(); - Error += test_uint(); - Error += test_uint(); - - return Error; - } -}//namespace nextMultiple - -namespace findNSB -{ - template - struct type - { - T Source; - int SignificantBitCount; - int Return; - }; - - template - int run() - { - type const Data[] = - { - { 0x00, 1,-1 }, - { 0x01, 2,-1 }, - { 0x02, 2,-1 }, - { 0x06, 3,-1 }, - { 0x01, 1, 0 }, - { 0x03, 1, 0 }, - { 0x03, 2, 1 }, - { 0x07, 2, 1 }, - { 0x05, 2, 2 }, - { 0x0D, 2, 2 } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - int const Result0 = glm::findNSB(Data[i].Source, Data[i].SignificantBitCount); - Error += Data[i].Return == Result0 ? 0 : 1; - assert(!Error); - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - Error += run(); - Error += run(); - Error += run(); - Error += run(); - - return Error; - } -}//namespace findNSB - -int main() -{ - int Error = 0; - - Error += findNSB::test(); - - Error += isPowerOfTwo::test(); - Error += prevPowerOfTwo::test(); - Error += nextPowerOfTwo::test(); - Error += nextPowerOfTwo_advanced::test(); - Error += prevMultiple::test(); - Error += nextMultiple::test(); - -# ifdef NDEBUG - Error += nextPowerOfTwo_advanced::perf(); - Error += nextMultiple::perf(); -# endif//NDEBUG - - return Error; -} - -#else - -int main() -{ - return 0; -} - -#endif diff --git a/3rdparty/glm/source/test/ext/ext_scalar_packing.cpp b/3rdparty/glm/source/test/ext/ext_scalar_packing.cpp deleted file mode 100644 index 77616e3..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_packing.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include - -int test_packUnorm() -{ - int Error = 0; - - - return Error; -} - -int test_packSnorm() -{ - int Error = 0; - - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_packUnorm(); - Error += test_packSnorm(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp b/3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp deleted file mode 100644 index ebba10d..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp +++ /dev/null @@ -1,171 +0,0 @@ -#include -#include -#include - -static int test_sec() -{ - int Error = 0; - - Error += glm::equal(glm::sec(0.0), 1.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::sec(glm::pi() * 2.0), 1.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::sec(glm::pi() * -2.0), 1.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::sec(glm::pi() * 1.0), -1.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::sec(glm::pi() * -1.0), -1.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_csc() -{ - int Error = 0; - - double const a = glm::csc(glm::pi() * 0.5); - Error += glm::equal(a, 1.0, 0.01) ? 0 : 1; - double const b = glm::csc(glm::pi() * -0.5); - Error += glm::equal(b, -1.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_cot() -{ - int Error = 0; - - double const a = glm::cot(glm::pi() * 0.5); - Error += glm::equal(a, 0.0, 0.01) ? 0 : 1; - double const b = glm::cot(glm::pi() * -0.5); - Error += glm::equal(b, 0.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_asec() -{ - int Error = 0; - - Error += glm::equal(glm::asec(100000.0), glm::pi() * 0.5, 0.01) ? 0 : 1; - Error += glm::equal(glm::asec(-100000.0), glm::pi() * 0.5, 0.01) ? 0 : 1; - - return Error; -} - -static int test_acsc() -{ - int Error = 0; - - Error += glm::equal(glm::acsc(100000.0), 0.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::acsc(-100000.0), 0.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_acot() -{ - int Error = 0; - - Error += glm::equal(glm::acot(100000.0), 0.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::acot(-100000.0), glm::pi(), 0.01) ? 0 : 1; - Error += glm::equal(glm::acot(0.0), glm::pi() * 0.5, 0.01) ? 0 : 1; - - return Error; -} - -static int test_sech() -{ - int Error = 0; - - Error += glm::equal(glm::sech(100000.0), 0.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::sech(-100000.0), 0.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::sech(0.0), 1.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_csch() -{ - int Error = 0; - - Error += glm::equal(glm::csch(100000.0), 0.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::csch(-100000.0), 0.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_coth() -{ - int Error = 0; - - double const a = glm::coth(100.0); - Error += glm::equal(a, 1.0, 0.01) ? 0 : 1; - - double const b = glm::coth(-100.0); - Error += glm::equal(b, -1.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_asech() -{ - int Error = 0; - - double const a = glm::asech(1.0); - Error += glm::equal(a, 0.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_acsch() -{ - int Error = 0; - - Error += glm::acsch(0.01) > 1.0 ? 0 : 1; - Error += glm::acsch(-0.01) < -1.0 ? 0 : 1; - - Error += glm::equal(glm::acsch(100.0), 0.0, 0.01) ? 0 : 1; - Error += glm::equal(glm::acsch(-100.0), 0.0, 0.01) ? 0 : 1; - - return Error; -} - -static int test_acoth() -{ - int Error = 0; - - double const a = glm::acoth(1.00001); - Error += a > 6.0 ? 0 : 1; - - double const b = glm::acoth(-1.00001); - Error += b < -6.0 ? 0 : 1; - - double const c = glm::acoth(10000.0); - Error += glm::equal(c, 0.0, 0.01) ? 0 : 1; - - double const d = glm::acoth(-10000.0); - Error += glm::equal(d, 0.0, 0.01) ? 0 : 1; - - return Error; -} - - -int main() -{ - int Error = 0; - - Error += test_sec(); - Error += test_csc(); - Error += test_cot(); - - Error += test_asec(); - Error += test_acsc(); - Error += test_acot(); - - Error += test_sech(); - Error += test_csch(); - Error += test_coth(); - - Error += test_asech(); - Error += test_acsch(); - Error += test_acoth(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_relational.cpp b/3rdparty/glm/source/test/ext/ext_scalar_relational.cpp deleted file mode 100644 index 61f1999..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_relational.cpp +++ /dev/null @@ -1,106 +0,0 @@ -#include -#include -#include -#include - -static int test_equal_epsilon() -{ -# if GLM_CONFIG_CONSTEXP == GLM_ENABLE - static_assert(glm::equal(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr"); - static_assert(!glm::equal(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr"); -# endif - - int Error = 0; - - Error += glm::equal(1.01f, 1.02f, 0.1f) ? 0 : 1; - Error += !glm::equal(1.01f, 1.02f, 0.001f) ? 0 : 1; - - return Error; -} - -static int test_notEqual_epsilon() -{ -# if GLM_CONFIG_CONSTEXP == GLM_ENABLE - static_assert(glm::notEqual(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr"); - static_assert(!glm::notEqual(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr"); -# endif - - int Error = 0; - - Error += glm::notEqual(1.01f, 1.02f, 0.001f) ? 0 : 1; - Error += !glm::notEqual(1.01f, 1.02f, 0.1f) ? 0 : 1; - - return Error; -} - -static int test_equal_ulps() -{ - int Error = 0; - - float const ULP1Plus = glm::nextFloat(1.0f); - Error += glm::equal(1.0f, ULP1Plus, 1) ? 0 : 1; - - float const ULP2Plus = glm::nextFloat(ULP1Plus); - Error += !glm::equal(1.0f, ULP2Plus, 1) ? 0 : 1; - - float const ULP1Minus = glm::prevFloat(1.0f); - Error += glm::equal(1.0f, ULP1Minus, 1) ? 0 : 1; - - float const ULP2Minus = glm::prevFloat(ULP1Minus); - Error += !glm::equal(1.0f, ULP2Minus, 1) ? 0 : 1; - - return Error; -} - -static int test_notEqual_ulps() -{ - int Error = 0; - - float const ULP1Plus = glm::nextFloat(1.0f); - Error += !glm::notEqual(1.0f, ULP1Plus, 1) ? 0 : 1; - - float const ULP2Plus = glm::nextFloat(ULP1Plus); - Error += glm::notEqual(1.0f, ULP2Plus, 1) ? 0 : 1; - - float const ULP1Minus = glm::prevFloat(1.0f); - Error += !glm::notEqual(1.0f, ULP1Minus, 1) ? 0 : 1; - - float const ULP2Minus = glm::prevFloat(ULP1Minus); - Error += glm::notEqual(1.0f, ULP2Minus, 1) ? 0 : 1; - - return Error; -} - -static int test_equal_sign() -{ - int Error = 0; - - Error += !glm::equal(-0.0f, 0.0f, 2) ? 0 : 1; - Error += !glm::equal(-0.0, 0.0, 2) ? 0 : 1; - - Error += !glm::equal(-1.0f, 2.0f, 2) ? 0 : 1; - Error += !glm::equal(-1.0, 2.0, 2) ? 0 : 1; - - Error += !glm::equal(-0.00001f, 1.00000f, 2) ? 0 : 1; - Error += !glm::equal(-0.00001, 1.00000, 2) ? 0 : 1; - - Error += !glm::equal(-1.0f, 1.0f, 2) ? 0 : 1; - Error += !glm::equal(-1.0, 1.0, 2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_equal_epsilon(); - Error += test_notEqual_epsilon(); - - Error += test_equal_ulps(); - Error += test_notEqual_ulps(); - - Error += test_equal_sign(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp b/3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp deleted file mode 100644 index 1122947..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::uint8) == 1, "uint8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); - static_assert(sizeof(glm::uint16) == sizeof(unsigned short), "unsigned short size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::uint32) == sizeof(unsigned int), "unsigned int size isn't 4 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::uint8) == 1 ? 0 : 1; - Error += sizeof(glm::uint16) == 2 ? 0 : 1; - Error += sizeof(glm::uint32) == 4 ? 0 : 1; - Error += sizeof(glm::uint64) == 8 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::uint8) < sizeof(glm::uint16) ? 0 : 1; - Error += sizeof(glm::uint16) < sizeof(glm::uint32) ? 0 : 1; - Error += sizeof(glm::uint32) < sizeof(glm::uint64) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp b/3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp deleted file mode 100644 index a19b774..0000000 --- a/3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp +++ /dev/null @@ -1,96 +0,0 @@ -#include -#include - -static int test_ulp_float_dist() -{ - int Error = 0; - - float A = 1.0f; - - float B = glm::nextFloat(A); - Error += glm::notEqual(A, B, 0) ? 0 : 1; - float C = glm::prevFloat(B); - Error += glm::equal(A, C, 0) ? 0 : 1; - - int D = glm::floatDistance(A, B); - Error += D == 1 ? 0 : 1; - int E = glm::floatDistance(A, C); - Error += E == 0 ? 0 : 1; - - return Error; -} - -static int test_ulp_float_step() -{ - int Error = 0; - - float A = 1.0f; - - for(int i = 10; i < 1000; i *= 10) - { - float B = glm::nextFloat(A, i); - Error += glm::notEqual(A, B, 0) ? 0 : 1; - float C = glm::prevFloat(B, i); - Error += glm::equal(A, C, 0) ? 0 : 1; - - int D = glm::floatDistance(A, B); - Error += D == i ? 0 : 1; - int E = glm::floatDistance(A, C); - Error += E == 0 ? 0 : 1; - } - - return Error; -} - -static int test_ulp_double_dist() -{ - int Error = 0; - - double A = 1.0; - - double B = glm::nextFloat(A); - Error += glm::notEqual(A, B, 0) ? 0 : 1; - double C = glm::prevFloat(B); - Error += glm::equal(A, C, 0) ? 0 : 1; - - glm::int64 const D = glm::floatDistance(A, B); - Error += D == 1 ? 0 : 1; - glm::int64 const E = glm::floatDistance(A, C); - Error += E == 0 ? 0 : 1; - - return Error; -} - -static int test_ulp_double_step() -{ - int Error = 0; - - double A = 1.0; - - for(int i = 10; i < 1000; i *= 10) - { - double B = glm::nextFloat(A, i); - Error += glm::notEqual(A, B, 0) ? 0 : 1; - double C = glm::prevFloat(B, i); - Error += glm::equal(A, C, 0) ? 0 : 1; - - glm::int64 const D = glm::floatDistance(A, B); - Error += D == i ? 0 : 1; - glm::int64 const E = glm::floatDistance(A, C); - Error += E == 0 ? 0 : 1; - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_ulp_float_dist(); - Error += test_ulp_float_step(); - Error += test_ulp_double_dist(); - Error += test_ulp_double_step(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vec1.cpp b/3rdparty/glm/source/test/ext/ext_vec1.cpp deleted file mode 100644 index fc0b931..0000000 --- a/3rdparty/glm/source/test/ext/ext_vec1.cpp +++ /dev/null @@ -1,157 +0,0 @@ -#define GLM_FORCE_SWIZZLE -#include -#include -#include - -static glm::vec1 g1; -static glm::vec1 g2(1); - -static int test_vec1_operators() -{ - int Error(0); - - glm::ivec1 A(1); - glm::ivec1 B(1); - { - bool R = A != B; - bool S = A == B; - - Error += (S && !R) ? 0 : 1; - } - - { - A *= 1; - B *= 1; - A += 1; - B += 1; - - bool R = A != B; - bool S = A == B; - - Error += (S && !R) ? 0 : 1; - } - - return Error; -} - -static int test_vec1_ctor() -{ - int Error = 0; - -# if GLM_HAS_TRIVIAL_QUERIES - // Error += std::is_trivially_default_constructible::value ? 0 : 1; - // Error += std::is_trivially_copy_assignable::value ? 0 : 1; - Error += std::is_trivially_copyable::value ? 0 : 1; - Error += std::is_trivially_copyable::value ? 0 : 1; - Error += std::is_trivially_copyable::value ? 0 : 1; - Error += std::is_trivially_copyable::value ? 0 : 1; - - Error += std::is_copy_constructible::value ? 0 : 1; -# endif - - - { - glm::ivec1 A = glm::vec1(2.0f); - - glm::ivec1 E(glm::dvec1(2.0)); - Error += A == E ? 0 : 1; - - glm::ivec1 F(glm::ivec1(2)); - Error += A == F ? 0 : 1; - } - - return Error; -} - -static int test_vec1_size() -{ - int Error = 0; - - Error += sizeof(glm::vec1) == sizeof(glm::mediump_vec1) ? 0 : 1; - Error += 4 == sizeof(glm::mediump_vec1) ? 0 : 1; - Error += sizeof(glm::dvec1) == sizeof(glm::highp_dvec1) ? 0 : 1; - Error += 8 == sizeof(glm::highp_dvec1) ? 0 : 1; - Error += glm::vec1().length() == 1 ? 0 : 1; - Error += glm::dvec1().length() == 1 ? 0 : 1; - Error += glm::vec1::length() == 1 ? 0 : 1; - Error += glm::dvec1::length() == 1 ? 0 : 1; - - GLM_CONSTEXPR std::size_t Length = glm::vec1::length(); - Error += Length == 1 ? 0 : 1; - - return Error; -} - -static int test_vec1_operator_increment() -{ - int Error(0); - - glm::ivec1 v0(1); - glm::ivec1 v1(v0); - glm::ivec1 v2(v0); - glm::ivec1 v3 = ++v1; - glm::ivec1 v4 = v2++; - - Error += glm::all(glm::equal(v0, v4)) ? 0 : 1; - Error += glm::all(glm::equal(v1, v2)) ? 0 : 1; - Error += glm::all(glm::equal(v1, v3)) ? 0 : 1; - - int i0(1); - int i1(i0); - int i2(i0); - int i3 = ++i1; - int i4 = i2++; - - Error += i0 == i4 ? 0 : 1; - Error += i1 == i2 ? 0 : 1; - Error += i1 == i3 ? 0 : 1; - - return Error; -} - -static int test_bvec1_ctor() -{ - int Error = 0; - - glm::bvec1 const A(true); - glm::bvec1 const B(true); - glm::bvec1 const C(false); - glm::bvec1 const D = A && B; - glm::bvec1 const E = A && C; - glm::bvec1 const F = A || C; - - Error += D == glm::bvec1(true) ? 0 : 1; - Error += E == glm::bvec1(false) ? 0 : 1; - Error += F == glm::bvec1(true) ? 0 : 1; - - bool const G = A == C; - bool const H = A != C; - Error += !G ? 0 : 1; - Error += H ? 0 : 1; - - return Error; -} - -static int test_constexpr() -{ -#if GLM_HAS_CONSTEXPR - static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr"); - static_assert(glm::vec1(1.0f).x > 0.0f, "GLM: Failed constexpr"); -#endif - - return 0; -} - -int main() -{ - int Error = 0; - - Error += test_vec1_size(); - Error += test_vec1_ctor(); - Error += test_bvec1_ctor(); - Error += test_vec1_operators(); - Error += test_vec1_operator_increment(); - Error += test_constexpr(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_bool1.cpp b/3rdparty/glm/source/test/ext/ext_vector_bool1.cpp deleted file mode 100644 index 43eed57..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_bool1.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include -#include - -template -static int test_operators() -{ - int Error = 0; - - genType const A(true); - genType const B(true); - { - bool const R = A != B; - bool const S = A == B; - Error += (S && !R) ? 0 : 1; - } - - return Error; -} - -template -static int test_ctor() -{ - int Error = 0; - - glm::bvec1 const A = genType(true); - - glm::bvec1 const E(genType(true)); - Error += A == E ? 0 : 1; - - glm::bvec1 const F(E); - Error += A == F ? 0 : 1; - - return Error; -} - -template -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::bvec1) == sizeof(genType) ? 0 : 1; - Error += genType().length() == 1 ? 0 : 1; - Error += genType::length() == 1 ? 0 : 1; - - return Error; -} - -template -static int test_relational() -{ - int Error = 0; - - genType const A(true); - genType const B(true); - genType const C(false); - - Error += A == B ? 0 : 1; - Error += (A && B) == A ? 0 : 1; - Error += (A || C) == A ? 0 : 1; - - return Error; -} - -template -static int test_constexpr() -{ -# if GLM_HAS_CONSTEXPR - static_assert(genType::length() == 1, "GLM: Failed constexpr"); -# endif - - return 0; -} - -int main() -{ - int Error = 0; - - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_common.cpp b/3rdparty/glm/source/test/ext/ext_vector_common.cpp deleted file mode 100644 index 211003f..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_common.cpp +++ /dev/null @@ -1,365 +0,0 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if ((GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC)) -# define GLM_NAN(T) NAN -#else -# define GLM_NAN(T) (static_cast(0.0f) / static_cast(0.0f)) -#endif - -template -static int test_min() -{ - typedef typename vecType::value_type T; - - int Error = 0; - - vecType const N(static_cast(0)); - vecType const B(static_cast(1)); - - Error += glm::all(glm::equal(glm::min(N, B), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(B, N), N, glm::epsilon())) ? 0 : 1; - - vecType const C(static_cast(2)); - Error += glm::all(glm::equal(glm::min(N, B, C), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(B, N, C), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(C, N, B), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(C, B, N), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(B, C, N), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(N, C, B), N, glm::epsilon())) ? 0 : 1; - - vecType const D(static_cast(3)); - Error += glm::all(glm::equal(glm::min(D, N, B, C), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(B, D, N, C), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(C, N, D, B), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(C, B, D, N), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(B, C, N, D), N, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::min(N, C, B, D), N, glm::epsilon())) ? 0 : 1; - - return Error; -} - -template -static int test_min_nan() -{ - typedef typename vecType::value_type T; - - int Error = 0; - - vecType const B(static_cast(1)); - vecType const N(GLM_NAN(T)); - - Error += glm::all(glm::isnan(glm::min(N, B))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(B, N))) ? 0 : 1; - - vecType const C(static_cast(2)); - Error += glm::all(glm::isnan(glm::min(N, B, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(B, N, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(C, N, B))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(C, B, N))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(B, C, N))) ? 0 : 1; - Error += glm::all(glm::isnan(glm::min(N, C, B))) ? 0 : 1; - - vecType const D(static_cast(3)); - Error += !glm::all(glm::isnan(glm::min(D, N, B, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(B, D, N, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(C, N, D, B))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(C, B, D, N))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::min(B, C, N, D))) ? 0 : 1; - Error += glm::all(glm::isnan(glm::min(N, C, B, D))) ? 0 : 1; - - return Error; -} - -template -static int test_max() -{ - typedef typename vecType::value_type T; - - int Error = 0; - - vecType const N(static_cast(0)); - vecType const B(static_cast(1)); - Error += glm::all(glm::equal(glm::max(N, B), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(B, N), B, glm::epsilon())) ? 0 : 1; - - vecType const C(static_cast(2)); - Error += glm::all(glm::equal(glm::max(N, B, C), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(B, N, C), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(C, N, B), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(C, B, N), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(B, C, N), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(N, C, B), C, glm::epsilon())) ? 0 : 1; - - vecType const D(static_cast(3)); - Error += glm::all(glm::equal(glm::max(D, N, B, C), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(B, D, N, C), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(C, N, D, B), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(C, B, D, N), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(B, C, N, D), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::max(N, C, B, D), D, glm::epsilon())) ? 0 : 1; - - return Error; -} - -template -static int test_max_nan() -{ - typedef typename vecType::value_type T; - - int Error = 0; - - vecType const B(static_cast(1)); - vecType const N(GLM_NAN(T)); - - Error += glm::all(glm::isnan(glm::max(N, B))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(B, N))) ? 0 : 1; - - vecType const C(static_cast(2)); - Error += glm::all(glm::isnan(glm::max(N, B, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(B, N, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(C, N, B))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(C, B, N))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(B, C, N))) ? 0 : 1; - Error += glm::all(glm::isnan(glm::max(N, C, B))) ? 0 : 1; - - vecType const D(static_cast(3)); - Error += !glm::all(glm::isnan(glm::max(D, N, B, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(B, D, N, C))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(C, N, D, B))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(C, B, D, N))) ? 0 : 1; - Error += !glm::all(glm::isnan(glm::max(B, C, N, D))) ? 0 : 1; - Error += glm::all(glm::isnan(glm::max(N, C, B, D))) ? 0 : 1; - - return Error; -} - -template -static int test_fmin() -{ - typedef typename vecType::value_type T; - - int Error = 0; - - vecType const B(static_cast(1)); - vecType const N(GLM_NAN(T)); - - Error += glm::all(glm::equal(glm::fmin(N, B), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(B, N), B, glm::epsilon())) ? 0 : 1; - - vecType const C(static_cast(2)); - Error += glm::all(glm::equal(glm::fmin(N, B, C), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(B, N, C), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(C, N, B), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(C, B, N), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(B, C, N), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(N, C, B), B, glm::epsilon())) ? 0 : 1; - - vecType const D(static_cast(3)); - Error += glm::all(glm::equal(glm::fmin(D, N, B, C), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(B, D, N, C), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(C, N, D, B), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(C, B, D, N), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(B, C, N, D), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmin(N, C, B, D), B, glm::epsilon())) ? 0 : 1; - - return Error; -} - -template -static int test_fmax() -{ - typedef typename vecType::value_type T; - - int Error = 0; - - vecType const B(static_cast(1)); - vecType const N(GLM_NAN(T)); - - Error += glm::all(glm::equal(glm::fmax(N, B), B, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(B, N), B, glm::epsilon())) ? 0 : 1; - - vecType const C(static_cast(2)); - Error += glm::all(glm::equal(glm::fmax(N, B, C), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(B, N, C), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(C, N, B), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(C, B, N), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(B, C, N), C, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(N, C, B), C, glm::epsilon())) ? 0 : 1; - - vecType const D(static_cast(3)); - Error += glm::all(glm::equal(glm::fmax(D, N, B, C), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(B, D, N, C), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(C, N, D, B), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(C, B, D, N), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(B, C, N, D), D, glm::epsilon())) ? 0 : 1; - Error += glm::all(glm::equal(glm::fmax(N, C, B, D), D, glm::epsilon())) ? 0 : 1; - - return Error; -} - -static int test_clamp() -{ - int Error = 0; - - glm::vec2 K = glm::clamp(glm::vec2(0.5f)); - Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; - - glm::vec3 L = glm::clamp(glm::vec3(0.5f)); - Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; - - glm::vec4 M = glm::clamp(glm::vec4(0.5f)); - Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; - - glm::vec1 N = glm::clamp(glm::vec1(0.5f)); - Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; - - return Error; -} - -static int test_repeat() -{ - int Error = 0; - - glm::vec2 K = glm::repeat(glm::vec2(0.5f)); - Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; - - glm::vec3 L = glm::repeat(glm::vec3(0.5f)); - Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; - - glm::vec4 M = glm::repeat(glm::vec4(0.5f)); - Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; - - glm::vec1 N = glm::repeat(glm::vec1(0.5f)); - Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; - - return Error; -} - -static int test_mirrorClamp() -{ - int Error = 0; - - glm::vec2 K = glm::mirrorClamp(glm::vec2(0.5f)); - Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; - - glm::vec3 L = glm::mirrorClamp(glm::vec3(0.5f)); - Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; - - glm::vec4 M = glm::mirrorClamp(glm::vec4(0.5f)); - Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; - - glm::vec1 N = glm::mirrorClamp(glm::vec1(0.5f)); - Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; - - return Error; -} - -static int test_mirrorRepeat() -{ - int Error = 0; - - glm::vec2 K = glm::mirrorRepeat(glm::vec2(0.5f)); - Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; - - glm::vec3 L = glm::mirrorRepeat(glm::vec3(0.5f)); - Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; - - glm::vec4 M = glm::mirrorRepeat(glm::vec4(0.5f)); - Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; - - glm::vec1 N = glm::mirrorRepeat(glm::vec1(0.5f)); - Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; - - return Error; -} - -static int test_iround() -{ - int Error = 0; - - for(float f = 0.0f; f < 3.1f; f += 0.05f) - { - int RoundFast = static_cast(glm::iround(f)); - int RoundSTD = static_cast(glm::round(f)); - Error += RoundFast == RoundSTD ? 0 : 1; - assert(!Error); - } - - return Error; -} - -static int test_uround() -{ - int Error = 0; - - for(float f = 0.0f; f < 3.1f; f += 0.05f) - { - int RoundFast = static_cast(glm::uround(f)); - int RoundSTD = static_cast(glm::round(f)); - Error += RoundFast == RoundSTD ? 0 : 1; - assert(!Error); - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_min(); - Error += test_min(); - Error += test_min_nan(); - Error += test_min_nan(); - - Error += test_max(); - Error += test_max(); - Error += test_max_nan(); - Error += test_max_nan(); - - Error += test_fmin(); - Error += test_fmin(); - - Error += test_fmax(); - Error += test_fmax(); - - Error += test_clamp(); - Error += test_repeat(); - Error += test_mirrorClamp(); - Error += test_mirrorRepeat(); - - Error += test_iround(); - Error += test_uround(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_iec559.cpp b/3rdparty/glm/source/test/ext/ext_vector_iec559.cpp deleted file mode 100644 index 5a9da50..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_iec559.cpp +++ /dev/null @@ -1,166 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -static int test_operators() -{ - typedef typename genType::value_type valType; - - int Error = 0; - - { - genType const A(1); - genType const B(1); - - genType const C = A + B; - Error += glm::all(glm::equal(C, genType(2), glm::epsilon())) ? 0 : 1; - - genType const D = A - B; - Error += glm::all(glm::equal(D, genType(0), glm::epsilon())) ? 0 : 1; - - genType const E = A * B; - Error += glm::all(glm::equal(E, genType(1), glm::epsilon())) ? 0 : 1; - - genType const F = A / B; - Error += glm::all(glm::equal(F, genType(1), glm::epsilon())) ? 0 : 1; - } - - return Error; -} - -template -static int test_ctor() -{ - typedef typename genType::value_type T; - - int Error = 0; - - glm::vec<1, T> const A = genType(1); - - glm::vec<1, T> const E(genType(1)); - Error += glm::all(glm::equal(A, E, glm::epsilon())) ? 0 : 1; - - glm::vec<1, T> const F(E); - Error += glm::all(glm::equal(A, F, glm::epsilon())) ? 0 : 1; - - genType const B = genType(1); - genType const G(glm::vec<2, T>(1)); - Error += glm::all(glm::equal(B, G, glm::epsilon())) ? 0 : 1; - - genType const H(glm::vec<3, T>(1)); - Error += glm::all(glm::equal(B, H, glm::epsilon())) ? 0 : 1; - - genType const I(glm::vec<4, T>(1)); - Error += glm::all(glm::equal(B, I, glm::epsilon())) ? 0 : 1; - - return Error; -} - -template -static int test_size() -{ - typedef typename genType::value_type T; - - int Error = 0; - - Error += sizeof(glm::vec<1, T>) == sizeof(genType) ? 0 : 1; - Error += genType().length() == 1 ? 0 : 1; - Error += genType::length() == 1 ? 0 : 1; - - return Error; -} - -template -static int test_relational() -{ - typedef typename genType::value_type valType; - - int Error = 0; - - genType const A(1); - genType const B(1); - genType const C(0); - - Error += all(equal(A, B, glm::epsilon())) ? 0 : 1; - Error += any(notEqual(A, C, glm::epsilon())) ? 0 : 1; - - return Error; -} - -template -static int test_constexpr() -{ -# if GLM_CONFIG_CONSTEXP == GLM_ENABLE - static_assert(genType::length() == 1, "GLM: Failed constexpr"); -# endif - - return 0; -} - -int main() -{ - int Error = 0; - - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp deleted file mode 100644 index c262f49..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::i8vec1) == 1, "int8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::i16vec1) == 2, "int16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::i32vec1) == 4, "int32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::i64vec1) == 8, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::i8vec1) == 1 ? 0 : 1; - Error += sizeof(glm::i16vec1) == 2 ? 0 : 1; - Error += sizeof(glm::i32vec1) == 4 ? 0 : 1; - Error += sizeof(glm::i64vec1) == 8 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8vec1) < sizeof(glm::i16vec1) ? 0 : 1; - Error += sizeof(glm::i16vec1) < sizeof(glm::i32vec1) ? 0 : 1; - Error += sizeof(glm::i32vec1) < sizeof(glm::i64vec1) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp deleted file mode 100644 index f4ad8b6..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::i8vec2) == 2, "int8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::i16vec2) == 4, "int16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::i32vec2) == 8, "int32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::i64vec2) == 16, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::i8vec2) == 2 ? 0 : 1; - Error += sizeof(glm::i16vec2) == 4 ? 0 : 1; - Error += sizeof(glm::i32vec2) == 8 ? 0 : 1; - Error += sizeof(glm::i64vec2) == 16 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8vec2) < sizeof(glm::i16vec2) ? 0 : 1; - Error += sizeof(glm::i16vec2) < sizeof(glm::i32vec2) ? 0 : 1; - Error += sizeof(glm::i32vec2) < sizeof(glm::i64vec2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp deleted file mode 100644 index c51bfe7..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::i8vec3) == 3, "int8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::i16vec3) == 6, "int16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::i32vec3) == 12, "int32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::i64vec3) == 24, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::i8vec3) == 3 ? 0 : 1; - Error += sizeof(glm::i16vec3) == 6 ? 0 : 1; - Error += sizeof(glm::i32vec3) == 12 ? 0 : 1; - Error += sizeof(glm::i64vec3) == 24 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8vec3) < sizeof(glm::i16vec3) ? 0 : 1; - Error += sizeof(glm::i16vec3) < sizeof(glm::i32vec3) ? 0 : 1; - Error += sizeof(glm::i32vec3) < sizeof(glm::i64vec3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp deleted file mode 100644 index 93fd9ed..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::i8vec4) == 4, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::i16vec4) == 8, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::i32vec4) == 16, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::i64vec4) == 32, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::i8vec4) == 4 ? 0 : 1; - Error += sizeof(glm::i16vec4) == 8 ? 0 : 1; - Error += sizeof(glm::i32vec4) == 16 ? 0 : 1; - Error += sizeof(glm::i64vec4) == 32 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::i8vec4) < sizeof(glm::i16vec4) ? 0 : 1; - Error += sizeof(glm::i16vec4) < sizeof(glm::i32vec4) ? 0 : 1; - Error += sizeof(glm::i32vec4) < sizeof(glm::i64vec4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_integer.cpp b/3rdparty/glm/source/test/ext/ext_vector_integer.cpp deleted file mode 100644 index d7278d3..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_integer.cpp +++ /dev/null @@ -1,547 +0,0 @@ -#include -#include -#include -#include -#include -#include - -namespace isPowerOfTwo -{ - template - struct type - { - genType Value; - bool Return; - }; - - template - int test_int16() - { - type const Data[] = - { - { 0x0001, true }, - { 0x0002, true }, - { 0x0004, true }, - { 0x0080, true }, - { 0x0000, true }, - { 0x0003, false } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::vec const Result = glm::isPowerOfTwo(glm::vec(Data[i].Value)); - Error += glm::vec(Data[i].Return) == Result ? 0 : 1; - } - - return Error; - } - - template - int test_uint16() - { - type const Data[] = - { - { 0x0001, true }, - { 0x0002, true }, - { 0x0004, true }, - { 0x0000, true }, - { 0x0000, true }, - { 0x0003, false } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::vec const Result = glm::isPowerOfTwo(glm::vec(Data[i].Value)); - Error += glm::vec(Data[i].Return) == Result ? 0 : 1; - } - - return Error; - } - - template - int test_int32() - { - type const Data[] = - { - { 0x00000001, true }, - { 0x00000002, true }, - { 0x00000004, true }, - { 0x0000000f, false }, - { 0x00000000, true }, - { 0x00000003, false } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::vec const Result = glm::isPowerOfTwo(glm::vec(Data[i].Value)); - Error += glm::vec(Data[i].Return) == Result ? 0 : 1; - } - - return Error; - } - - template - int test_uint32() - { - type const Data[] = - { - { 0x00000001, true }, - { 0x00000002, true }, - { 0x00000004, true }, - { 0x80000000, true }, - { 0x00000000, true }, - { 0x00000003, false } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::vec const Result = glm::isPowerOfTwo(glm::vec(Data[i].Value)); - Error += glm::vec(Data[i].Return) == Result ? 0 : 1; - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += test_int16<1>(); - Error += test_int16<2>(); - Error += test_int16<3>(); - Error += test_int16<4>(); - - Error += test_uint16<1>(); - Error += test_uint16<2>(); - Error += test_uint16<3>(); - Error += test_uint16<4>(); - - Error += test_int32<1>(); - Error += test_int32<2>(); - Error += test_int32<3>(); - Error += test_int32<4>(); - - Error += test_uint32<1>(); - Error += test_uint32<2>(); - Error += test_uint32<3>(); - Error += test_uint32<4>(); - - return Error; - } -}//isPowerOfTwo - -namespace prevPowerOfTwo -{ - template - int run() - { - int Error = 0; - - glm::vec const A = glm::prevPowerOfTwo(glm::vec(7)); - Error += A == glm::vec(4) ? 0 : 1; - - glm::vec const B = glm::prevPowerOfTwo(glm::vec(15)); - Error += B == glm::vec(8) ? 0 : 1; - - glm::vec const C = glm::prevPowerOfTwo(glm::vec(31)); - Error += C == glm::vec(16) ? 0 : 1; - - glm::vec const D = glm::prevPowerOfTwo(glm::vec(32)); - Error += D == glm::vec(32) ? 0 : 1; - - return Error; - } - - int test() - { - int Error = 0; - - Error += run<1, glm::int8>(); - Error += run<2, glm::int8>(); - Error += run<3, glm::int8>(); - Error += run<4, glm::int8>(); - - Error += run<1, glm::int16>(); - Error += run<2, glm::int16>(); - Error += run<3, glm::int16>(); - Error += run<4, glm::int16>(); - - Error += run<1, glm::int32>(); - Error += run<2, glm::int32>(); - Error += run<3, glm::int32>(); - Error += run<4, glm::int32>(); - - Error += run<1, glm::int64>(); - Error += run<2, glm::int64>(); - Error += run<3, glm::int64>(); - Error += run<4, glm::int64>(); - - Error += run<1, glm::uint8>(); - Error += run<2, glm::uint8>(); - Error += run<3, glm::uint8>(); - Error += run<4, glm::uint8>(); - - Error += run<1, glm::uint16>(); - Error += run<2, glm::uint16>(); - Error += run<3, glm::uint16>(); - Error += run<4, glm::uint16>(); - - Error += run<1, glm::uint32>(); - Error += run<2, glm::uint32>(); - Error += run<3, glm::uint32>(); - Error += run<4, glm::uint32>(); - - Error += run<1, glm::uint64>(); - Error += run<2, glm::uint64>(); - Error += run<3, glm::uint64>(); - Error += run<4, glm::uint64>(); - - return Error; - } -}//namespace prevPowerOfTwo - -namespace nextPowerOfTwo -{ - template - int run() - { - int Error = 0; - - glm::vec const A = glm::nextPowerOfTwo(glm::vec(7)); - Error += A == glm::vec(8) ? 0 : 1; - - glm::vec const B = glm::nextPowerOfTwo(glm::vec(15)); - Error += B == glm::vec(16) ? 0 : 1; - - glm::vec const C = glm::nextPowerOfTwo(glm::vec(31)); - Error += C == glm::vec(32) ? 0 : 1; - - glm::vec const D = glm::nextPowerOfTwo(glm::vec(32)); - Error += D == glm::vec(32) ? 0 : 1; - - return Error; - } - - int test() - { - int Error = 0; - - Error += run<1, glm::int8>(); - Error += run<2, glm::int8>(); - Error += run<3, glm::int8>(); - Error += run<4, glm::int8>(); - - Error += run<1, glm::int16>(); - Error += run<2, glm::int16>(); - Error += run<3, glm::int16>(); - Error += run<4, glm::int16>(); - - Error += run<1, glm::int32>(); - Error += run<2, glm::int32>(); - Error += run<3, glm::int32>(); - Error += run<4, glm::int32>(); - - Error += run<1, glm::int64>(); - Error += run<2, glm::int64>(); - Error += run<3, glm::int64>(); - Error += run<4, glm::int64>(); - - Error += run<1, glm::uint8>(); - Error += run<2, glm::uint8>(); - Error += run<3, glm::uint8>(); - Error += run<4, glm::uint8>(); - - Error += run<1, glm::uint16>(); - Error += run<2, glm::uint16>(); - Error += run<3, glm::uint16>(); - Error += run<4, glm::uint16>(); - - Error += run<1, glm::uint32>(); - Error += run<2, glm::uint32>(); - Error += run<3, glm::uint32>(); - Error += run<4, glm::uint32>(); - - Error += run<1, glm::uint64>(); - Error += run<2, glm::uint64>(); - Error += run<3, glm::uint64>(); - Error += run<4, glm::uint64>(); - - return Error; - } -}//namespace nextPowerOfTwo - -namespace prevMultiple -{ - template - struct type - { - genIUType Source; - genIUType Multiple; - genIUType Return; - }; - - template - int run() - { - type const Data[] = - { - { 8, 3, 6 }, - { 7, 7, 7 } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::vec const Result0 = glm::prevMultiple(glm::vec(Data[i].Source), Data[i].Multiple); - Error += glm::vec(Data[i].Return) == Result0 ? 0 : 1; - - glm::vec const Result1 = glm::prevMultiple(glm::vec(Data[i].Source), glm::vec(Data[i].Multiple)); - Error += glm::vec(Data[i].Return) == Result1 ? 0 : 1; - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += run<1, glm::int8>(); - Error += run<2, glm::int8>(); - Error += run<3, glm::int8>(); - Error += run<4, glm::int8>(); - - Error += run<1, glm::int16>(); - Error += run<2, glm::int16>(); - Error += run<3, glm::int16>(); - Error += run<4, glm::int16>(); - - Error += run<1, glm::int32>(); - Error += run<2, glm::int32>(); - Error += run<3, glm::int32>(); - Error += run<4, glm::int32>(); - - Error += run<1, glm::int64>(); - Error += run<2, glm::int64>(); - Error += run<3, glm::int64>(); - Error += run<4, glm::int64>(); - - Error += run<1, glm::uint8>(); - Error += run<2, glm::uint8>(); - Error += run<3, glm::uint8>(); - Error += run<4, glm::uint8>(); - - Error += run<1, glm::uint16>(); - Error += run<2, glm::uint16>(); - Error += run<3, glm::uint16>(); - Error += run<4, glm::uint16>(); - - Error += run<1, glm::uint32>(); - Error += run<2, glm::uint32>(); - Error += run<3, glm::uint32>(); - Error += run<4, glm::uint32>(); - - Error += run<1, glm::uint64>(); - Error += run<2, glm::uint64>(); - Error += run<3, glm::uint64>(); - Error += run<4, glm::uint64>(); - - return Error; - } -}//namespace prevMultiple - -namespace nextMultiple -{ - template - struct type - { - genIUType Source; - genIUType Multiple; - genIUType Return; - }; - - template - int run() - { - type const Data[] = - { - { 3, 4, 4 }, - { 6, 3, 6 }, - { 5, 3, 6 }, - { 7, 7, 7 }, - { 0, 1, 0 }, - { 8, 3, 9 } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::vec const Result0 = glm::nextMultiple(glm::vec(Data[i].Source), glm::vec(Data[i].Multiple)); - Error += glm::vec(Data[i].Return) == Result0 ? 0 : 1; - - glm::vec const Result1 = glm::nextMultiple(glm::vec(Data[i].Source), Data[i].Multiple); - Error += glm::vec(Data[i].Return) == Result1 ? 0 : 1; - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += run<1, glm::int8>(); - Error += run<2, glm::int8>(); - Error += run<3, glm::int8>(); - Error += run<4, glm::int8>(); - - Error += run<1, glm::int16>(); - Error += run<2, glm::int16>(); - Error += run<3, glm::int16>(); - Error += run<4, glm::int16>(); - - Error += run<1, glm::int32>(); - Error += run<2, glm::int32>(); - Error += run<3, glm::int32>(); - Error += run<4, glm::int32>(); - - Error += run<1, glm::int64>(); - Error += run<2, glm::int64>(); - Error += run<3, glm::int64>(); - Error += run<4, glm::int64>(); - - Error += run<1, glm::uint8>(); - Error += run<2, glm::uint8>(); - Error += run<3, glm::uint8>(); - Error += run<4, glm::uint8>(); - - Error += run<1, glm::uint16>(); - Error += run<2, glm::uint16>(); - Error += run<3, glm::uint16>(); - Error += run<4, glm::uint16>(); - - Error += run<1, glm::uint32>(); - Error += run<2, glm::uint32>(); - Error += run<3, glm::uint32>(); - Error += run<4, glm::uint32>(); - - Error += run<1, glm::uint64>(); - Error += run<2, glm::uint64>(); - Error += run<3, glm::uint64>(); - Error += run<4, glm::uint64>(); - - return Error; - } -}//namespace nextMultiple - -namespace findNSB -{ - template - struct type - { - T Source; - int SignificantBitCount; - int Return; - }; - - template - int run() - { - type const Data[] = - { - { 0x00, 1,-1 }, - { 0x01, 2,-1 }, - { 0x02, 2,-1 }, - { 0x06, 3,-1 }, - { 0x01, 1, 0 }, - { 0x03, 1, 0 }, - { 0x03, 2, 1 }, - { 0x07, 2, 1 }, - { 0x05, 2, 2 }, - { 0x0D, 2, 2 } - }; - - int Error = 0; - - for (std::size_t i = 0, n = sizeof(Data) / sizeof(type); i < n; ++i) - { - glm::vec const Result0 = glm::findNSB(glm::vec(Data[i].Source), glm::vec(Data[i].SignificantBitCount)); - Error += glm::vec(Data[i].Return) == Result0 ? 0 : 1; - assert(!Error); - } - - return Error; - } - - int test() - { - int Error = 0; - - Error += run<1, glm::uint8>(); - Error += run<2, glm::uint8>(); - Error += run<3, glm::uint8>(); - Error += run<4, glm::uint8>(); - - Error += run<1, glm::uint16>(); - Error += run<2, glm::uint16>(); - Error += run<3, glm::uint16>(); - Error += run<4, glm::uint16>(); - - Error += run<1, glm::uint32>(); - Error += run<2, glm::uint32>(); - Error += run<3, glm::uint32>(); - Error += run<4, glm::uint32>(); - - Error += run<1, glm::uint64>(); - Error += run<2, glm::uint64>(); - Error += run<3, glm::uint64>(); - Error += run<4, glm::uint64>(); - - Error += run<1, glm::int8>(); - Error += run<2, glm::int8>(); - Error += run<3, glm::int8>(); - Error += run<4, glm::int8>(); - - Error += run<1, glm::int16>(); - Error += run<2, glm::int16>(); - Error += run<3, glm::int16>(); - Error += run<4, glm::int16>(); - - Error += run<1, glm::int32>(); - Error += run<2, glm::int32>(); - Error += run<3, glm::int32>(); - Error += run<4, glm::int32>(); - - Error += run<1, glm::int64>(); - Error += run<2, glm::int64>(); - Error += run<3, glm::int64>(); - Error += run<4, glm::int64>(); - - - return Error; - } -}//namespace findNSB - -int main() -{ - int Error = 0; - - Error += isPowerOfTwo::test(); - Error += prevPowerOfTwo::test(); - Error += nextPowerOfTwo::test(); - Error += prevMultiple::test(); - Error += nextMultiple::test(); - Error += findNSB::test(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp deleted file mode 100644 index 52b3f4e..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp +++ /dev/null @@ -1,216 +0,0 @@ -#include -#include -#include -#include -#include - -template -static int test_operators() -{ - int Error = 0; - - { - genType const A(1); - genType const B(1); - - bool const R = A != B; - bool const S = A == B; - Error += (S && !R) ? 0 : 1; - } - - { - genType const A(1); - genType const B(1); - - genType const C = A + B; - Error += C == genType(2) ? 0 : 1; - - genType const D = A - B; - Error += D == genType(0) ? 0 : 1; - - genType const E = A * B; - Error += E == genType(1) ? 0 : 1; - - genType const F = A / B; - Error += F == genType(1) ? 0 : 1; - } - - { - genType const A(3); - genType const B(2); - - genType const C = A % B; - Error += C == genType(1) ? 0 : 1; - } - - { - genType const A(1); - genType const B(1); - genType const C(0); - - genType const I = A & B; - Error += I == genType(1) ? 0 : 1; - genType const D = A & C; - Error += D == genType(0) ? 0 : 1; - - genType const E = A | B; - Error += E == genType(1) ? 0 : 1; - genType const F = A | C; - Error += F == genType(1) ? 0 : 1; - - genType const G = A ^ B; - Error += G == genType(0) ? 0 : 1; - genType const H = A ^ C; - Error += H == genType(1) ? 0 : 1; - } - - { - genType const A(0); - genType const B(1); - genType const C(2); - - genType const D = B << B; - Error += D == genType(2) ? 0 : 1; - genType const E = C >> B; - Error += E == genType(1) ? 0 : 1; - } - - return Error; -} - -template -static int test_ctor() -{ - typedef typename genType::value_type T; - - int Error = 0; - - genType const A = genType(1); - - genType const E(genType(1)); - Error += A == E ? 0 : 1; - - genType const F(E); - Error += A == F ? 0 : 1; - - genType const B = genType(1); - genType const G(glm::vec<2, T>(1)); - Error += B == G ? 0 : 1; - - genType const H(glm::vec<3, T>(1)); - Error += B == H ? 0 : 1; - - genType const I(glm::vec<4, T>(1)); - Error += B == I ? 0 : 1; - - return Error; -} - -template -static int test_size() -{ - int Error = 0; - - Error += sizeof(typename genType::value_type) == sizeof(genType) ? 0 : 1; - Error += genType().length() == 1 ? 0 : 1; - Error += genType::length() == 1 ? 0 : 1; - - return Error; -} - -template -static int test_relational() -{ - int Error = 0; - - genType const A(1); - genType const B(1); - genType const C(0); - - Error += A == B ? 0 : 1; - Error += A != C ? 0 : 1; - Error += all(equal(A, B)) ? 0 : 1; - Error += any(notEqual(A, C)) ? 0 : 1; - - return Error; -} - -template -static int test_constexpr() -{ -# if GLM_CONFIG_CONSTEXP == GLM_ENABLE - static_assert(genType::length() == 1, "GLM: Failed constexpr"); - static_assert(genType(1)[0] == 1, "GLM: Failed constexpr"); - static_assert(genType(1) == genType(1), "GLM: Failed constexpr"); - static_assert(genType(1) != genType(0), "GLM: Failed constexpr"); -# endif - - return 0; -} - -int main() -{ - int Error = 0; - - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_packing.cpp b/3rdparty/glm/source/test/ext/ext_vector_packing.cpp deleted file mode 100644 index d7cbce2..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_packing.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -int test_packUnorm() -{ - int Error = 0; - - std::vector A; - A.push_back(glm::vec2(1.0f, 0.7f)); - A.push_back(glm::vec2(0.5f, 0.1f)); - - for (std::size_t i = 0; i < A.size(); ++i) - { - glm::vec2 B(A[i]); - glm::u16vec2 C = glm::packUnorm(B); - glm::vec2 D = glm::unpackUnorm(C); - Error += glm::all(glm::equal(B, D, 1.0f / 255.f)) ? 0 : 1; - assert(!Error); - } - - return Error; -} - -int test_packSnorm() -{ - int Error = 0; - - std::vector A; - A.push_back(glm::vec2(1.0f, 0.0f)); - A.push_back(glm::vec2(-0.5f, -0.7f)); - A.push_back(glm::vec2(-0.1f, 0.1f)); - - for (std::size_t i = 0; i < A.size(); ++i) - { - glm::vec2 B(A[i]); - glm::i16vec2 C = glm::packSnorm(B); - glm::vec2 D = glm::unpackSnorm(C); - Error += glm::all(glm::equal(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1; - assert(!Error); - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_packUnorm(); - Error += test_packSnorm(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp b/3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp deleted file mode 100644 index f4b9f18..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp +++ /dev/null @@ -1,186 +0,0 @@ -#include -#include -#include -#include - -static int test_sec() -{ - int Error = 0; - - glm::dvec1 const a = glm::sec(glm::dvec1(0.0)); - Error += glm::all(glm::equal(a, glm::dvec1(1.0), 0.01)) ? 0 : 1; - - glm::dvec1 const b = glm::sec(glm::dvec1(glm::pi() * 2.0)); - Error += glm::all(glm::equal(b, glm::dvec1(1.0), 0.01)) ? 0 : 1; - - glm::dvec1 const c = glm::sec(glm::dvec1(glm::pi() * -2.0)); - Error += glm::all(glm::equal(c, glm::dvec1(1.0), 0.01)) ? 0 : 1; - - glm::dvec1 const d = glm::sec(glm::dvec1(glm::pi() * 1.0)); - Error += glm::all(glm::equal(d, -glm::dvec1(1.0), 0.01)) ? 0 : 1; - - glm::dvec1 const e = glm::sec(glm::dvec1(glm::pi() * -1.0)); - Error += glm::all(glm::equal(e, -glm::dvec1(1.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_csc() -{ - int Error = 0; - - glm::dvec1 const a = glm::csc(glm::dvec1(glm::pi() * 0.5)); - Error += glm::all(glm::equal(a, glm::dvec1(1.0), 0.01)) ? 0 : 1; - - glm::dvec1 const b = glm::csc(glm::dvec1(glm::pi() * -0.5)); - Error += glm::all(glm::equal(b, glm::dvec1(-1.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_cot() -{ - int Error = 0; - - glm::dvec1 const a = glm::cot(glm::dvec1(glm::pi() * 0.5)); - Error += glm::all(glm::equal(a, glm::dvec1(0.0), 0.01)) ? 0 : 1; - - glm::dvec1 const b = glm::cot(glm::dvec1(glm::pi() * -0.5)); - Error += glm::all(glm::equal(b, glm::dvec1(0.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_asec() -{ - int Error = 0; - - Error += glm::all(glm::equal(glm::asec(glm::dvec1(100000.0)), glm::dvec1(glm::pi() * 0.5), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::asec(glm::dvec1(-100000.0)), glm::dvec1(glm::pi() * 0.5), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_acsc() -{ - int Error = 0; - - Error += glm::all(glm::equal(glm::acsc(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::acsc(glm::dvec1(-100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_acot() -{ - int Error = 0; - - Error += glm::all(glm::equal(glm::acot(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::acot(glm::dvec1(-100000.0)), glm::dvec1(glm::pi()), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::acot(glm::dvec1(0.0)), glm::dvec1(glm::pi() * 0.5), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_sech() -{ - int Error = 0; - - Error += glm::all(glm::equal(glm::sech(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::sech(glm::dvec1(-100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::sech(glm::dvec1(0.0)), glm::dvec1(1.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_csch() -{ - int Error = 0; - - Error += glm::all(glm::equal(glm::csch(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::csch(glm::dvec1(-100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_coth() -{ - int Error = 0; - - glm::dvec1 const a = glm::coth(glm::dvec1(100.0)); - Error += glm::all(glm::equal(a, glm::dvec1(1.0), 0.01)) ? 0 : 1; - - glm::dvec1 const b = glm::coth(glm::dvec1(-100.0)); - Error += glm::all(glm::equal(b, glm::dvec1(-1.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_asech() -{ - int Error = 0; - - glm::dvec1 const a = glm::asech(glm::dvec1(1.0)); - Error += glm::all(glm::equal(a, glm::dvec1(0.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_acsch() -{ - int Error = 0; - - glm::dvec1 const a(glm::acsch(glm::dvec1(0.01))); - Error += a.x > 1.0 ? 0 : 1; - - glm::dvec1 const b(glm::acsch(glm::dvec1(-0.01))); - Error += b.x < -1.0 ? 0 : 1; - - Error += glm::all(glm::equal(glm::acsch(glm::dvec1(100.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - Error += glm::all(glm::equal(glm::acsch(glm::dvec1(-100.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1; - - return Error; -} - -static int test_acoth() -{ - int Error = 0; - - glm::dvec1 const a = glm::acoth(glm::dvec1(1.00001)); - Error += a.x > 6.0 ? 0 : 1; - - glm::dvec1 const b = glm::acoth(glm::dvec1(-1.00001)); - Error += b.x < -6.0 ? 0 : 1; - - glm::dvec1 const c = glm::acoth(glm::dvec1(10000.0)); - Error += glm::all(glm::equal(c, glm::dvec1(0.0), 0.01)) ? 0 : 1; - - glm::dvec1 const d = glm::acoth(glm::dvec1(-10000.0)); - Error += glm::all(glm::equal(d, glm::dvec1(0.0), 0.01)) ? 0 : 1; - - return Error; -} - - -int main() -{ - int Error = 0; - - Error += test_sec(); - Error += test_csc(); - Error += test_cot(); - - Error += test_asec(); - Error += test_acsc(); - Error += test_acot(); - - Error += test_sech(); - Error += test_csch(); - Error += test_coth(); - - Error += test_asech(); - Error += test_acsch(); - Error += test_acoth(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_relational.cpp b/3rdparty/glm/source/test/ext/ext_vector_relational.cpp deleted file mode 100644 index f6cd307..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_relational.cpp +++ /dev/null @@ -1,205 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -static int test_equal() -{ - typedef typename vecType::value_type valType; - - valType const A = static_cast(1.01f); - valType const B = static_cast(1.02f); - valType const Epsilon1 = static_cast(0.1f); - valType const Epsilon2 = static_cast(0.001f); - - int Error = 0; - - Error += glm::all(glm::equal(vecType(A), vecType(B), Epsilon1)) ? 0 : 1; - Error += glm::all(glm::equal(vecType(A), vecType(B), vecType(Epsilon1))) ? 0 : 1; - - Error += !glm::any(glm::equal(vecType(A), vecType(B), Epsilon2)) ? 0 : 1; - Error += !glm::any(glm::equal(vecType(A), vecType(B), vecType(Epsilon2))) ? 0 : 1; - - return Error; -} - -template -static int test_notEqual() -{ - typedef typename vecType::value_type valType; - - valType const A = static_cast(1.01f); - valType const B = static_cast(1.02f); - valType const Epsilon1 = static_cast(0.1f); - valType const Epsilon2 = static_cast(0.001f); - - int Error = 0; - - Error += glm::all(glm::notEqual(vecType(A), vecType(B), Epsilon2)) ? 0 : 1; - Error += glm::all(glm::notEqual(vecType(A), vecType(B), vecType(Epsilon2))) ? 0 : 1; - - Error += !glm::any(glm::notEqual(vecType(A), vecType(B), Epsilon1)) ? 0 : 1; - Error += !glm::any(glm::notEqual(vecType(A), vecType(B), vecType(Epsilon1))) ? 0 : 1; - - return Error; -} - -template -static int test_constexpr() -{ -# if GLM_CONFIG_CONSTEXP == GLM_ENABLE - static_assert(glm::all(glm::equal(genType(static_cast(1.01f)), genType(static_cast(1.02f)), static_cast(0.1f))), "GLM: Failed constexpr"); -# endif - - return 0; -} - -template -static int test_equal_ulps() -{ - typedef glm::vec<4, T, glm::defaultp> vec4; - - T const One(1); - vec4 const Ones(1); - - int Error = 0; - - T const ULP1Plus = glm::nextFloat(One); - Error += glm::all(glm::equal(Ones, vec4(ULP1Plus), 1)) ? 0 : 1; - - T const ULP2Plus = glm::nextFloat(ULP1Plus); - Error += !glm::all(glm::equal(Ones, vec4(ULP2Plus), 1)) ? 0 : 1; - - T const ULP1Minus = glm::prevFloat(One); - Error += glm::all(glm::equal(Ones, vec4(ULP1Minus), 1)) ? 0 : 1; - - T const ULP2Minus = glm::prevFloat(ULP1Minus); - Error += !glm::all(glm::equal(Ones, vec4(ULP2Minus), 1)) ? 0 : 1; - - return Error; -} - -template -static int test_notEqual_ulps() -{ - typedef glm::vec<4, T, glm::defaultp> vec4; - - T const One(1); - vec4 const Ones(1); - - int Error = 0; - - T const ULP1Plus = glm::nextFloat(One); - Error += !glm::all(glm::notEqual(Ones, vec4(ULP1Plus), 1)) ? 0 : 1; - - T const ULP2Plus = glm::nextFloat(ULP1Plus); - Error += glm::all(glm::notEqual(Ones, vec4(ULP2Plus), 1)) ? 0 : 1; - - T const ULP1Minus = glm::prevFloat(One); - Error += !glm::all(glm::notEqual(Ones, vec4(ULP1Minus), 1)) ? 0 : 1; - - T const ULP2Minus = glm::prevFloat(ULP1Minus); - Error += glm::all(glm::notEqual(Ones, vec4(ULP2Minus), 1)) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_equal_ulps(); - Error += test_equal_ulps(); - Error += test_notEqual_ulps(); - Error += test_notEqual_ulps(); - - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - Error += test_equal(); - - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - Error += test_notEqual(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp deleted file mode 100644 index f2e4624..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT - static_assert(sizeof(glm::u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); - static_assert(sizeof(glm::u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); - static_assert(sizeof(glm::u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); - static_assert(sizeof(glm::u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::u8vec1) == 1 ? 0 : 1; - Error += sizeof(glm::u16vec1) == 2 ? 0 : 1; - Error += sizeof(glm::u32vec1) == 4 ? 0 : 1; - Error += sizeof(glm::u64vec1) == 8 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8vec1) < sizeof(glm::u16vec1) ? 0 : 1; - Error += sizeof(glm::u16vec1) < sizeof(glm::u32vec1) ? 0 : 1; - Error += sizeof(glm::u32vec1) < sizeof(glm::u64vec1) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp deleted file mode 100644 index 9c0977e..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8vec2) == 2, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16vec2) == 4, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32vec2) == 8, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64vec2) == 16, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::u8vec2) == 2 ? 0 : 1; - Error += sizeof(glm::u16vec2) == 4 ? 0 : 1; - Error += sizeof(glm::u32vec2) == 8 ? 0 : 1; - Error += sizeof(glm::u64vec2) == 16 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8vec2) < sizeof(glm::u16vec2) ? 0 : 1; - Error += sizeof(glm::u16vec2) < sizeof(glm::u32vec2) ? 0 : 1; - Error += sizeof(glm::u32vec2) < sizeof(glm::u64vec2) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp deleted file mode 100644 index 4cc2e44..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8vec3) == 3, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16vec3) == 6, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32vec3) == 12, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64vec3) == 24, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::u8vec3) == 3 ? 0 : 1; - Error += sizeof(glm::u16vec3) == 6 ? 0 : 1; - Error += sizeof(glm::u32vec3) == 12 ? 0 : 1; - Error += sizeof(glm::u64vec3) == 24 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8vec3) < sizeof(glm::u16vec3) ? 0 : 1; - Error += sizeof(glm::u16vec3) < sizeof(glm::u32vec3) ? 0 : 1; - Error += sizeof(glm::u32vec3) < sizeof(glm::u64vec3) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp deleted file mode 100644 index 9e7ffe7..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#if GLM_HAS_STATIC_ASSERT -static_assert(sizeof(glm::u8vec4) == 4, "int8 size isn't 1 byte on this platform"); -static_assert(sizeof(glm::u16vec4) == 8, "int16 size isn't 2 bytes on this platform"); -static_assert(sizeof(glm::u32vec4) == 16, "int32 size isn't 4 bytes on this platform"); -static_assert(sizeof(glm::u64vec4) == 32, "int64 size isn't 8 bytes on this platform"); -#endif - -static int test_size() -{ - int Error = 0; - - Error += sizeof(glm::u8vec4) == 4 ? 0 : 1; - Error += sizeof(glm::u16vec4) == 8 ? 0 : 1; - Error += sizeof(glm::u32vec4) == 16 ? 0 : 1; - Error += sizeof(glm::u64vec4) == 32 ? 0 : 1; - - return Error; -} - -static int test_comp() -{ - int Error = 0; - - Error += sizeof(glm::u8vec4) < sizeof(glm::u16vec4) ? 0 : 1; - Error += sizeof(glm::u16vec4) < sizeof(glm::u32vec4) ? 0 : 1; - Error += sizeof(glm::u32vec4) < sizeof(glm::u64vec4) ? 0 : 1; - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_size(); - Error += test_comp(); - - return Error; -} diff --git a/3rdparty/glm/source/test/ext/ext_vector_ulp.cpp b/3rdparty/glm/source/test/ext/ext_vector_ulp.cpp deleted file mode 100644 index 6ebd1a1..0000000 --- a/3rdparty/glm/source/test/ext/ext_vector_ulp.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include -#include -#include -#include -#include - -static int test_ulp_float_dist() -{ - int Error = 0; - - glm::vec4 const A(1.0f); - - glm::vec4 const B = glm::nextFloat(A); - Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1; - glm::vec4 const C = glm::prevFloat(B); - Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1; - - glm::ivec4 const D = glm::floatDistance(A, B); - Error += D == glm::ivec4(1) ? 0 : 1; - glm::ivec4 const E = glm::floatDistance(A, C); - Error += E == glm::ivec4(0) ? 0 : 1; - - return Error; -} - -static int test_ulp_float_step() -{ - int Error = 0; - - glm::vec4 const A(1.0f); - - for(int i = 10; i < 1000; i *= 10) - { - glm::vec4 const B = glm::nextFloat(A, i); - Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1; - glm::vec4 const C = glm::prevFloat(B, i); - Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1; - - glm::ivec4 const D = glm::floatDistance(A, B); - Error += D == glm::ivec4(i) ? 0 : 1; - glm::ivec4 const E = glm::floatDistance(A, C); - Error += E == glm::ivec4(0) ? 0 : 1; - } - - return Error; -} - -static int test_ulp_double_dist() -{ - int Error = 0; - - glm::dvec4 const A(1.0); - - glm::dvec4 const B = glm::nextFloat(A); - Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1; - glm::dvec4 const C = glm::prevFloat(B); - Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1; - - glm::ivec4 const D(glm::floatDistance(A, B)); - Error += D == glm::ivec4(1) ? 0 : 1; - glm::ivec4 const E = glm::floatDistance(A, C); - Error += E == glm::ivec4(0) ? 0 : 1; - - return Error; -} - -static int test_ulp_double_step() -{ - int Error = 0; - - glm::dvec4 const A(1.0); - - for(int i = 10; i < 1000; i *= 10) - { - glm::dvec4 const B = glm::nextFloat(A, i); - Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1; - glm::dvec4 const C = glm::prevFloat(B, i); - Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1; - - glm::ivec4 const D(glm::floatDistance(A, B)); - Error += D == glm::ivec4(i) ? 0 : 1; - glm::ivec4 const E(glm::floatDistance(A, C)); - Error += E == glm::ivec4(0) ? 0 : 1; - } - - return Error; -} - -int main() -{ - int Error = 0; - - Error += test_ulp_float_dist(); - Error += test_ulp_float_step(); - Error += test_ulp_double_dist(); - Error += test_ulp_double_step(); - - return Error; -} -- cgit v1.2.3-70-g09d2