Fixed build

This commit is contained in:
Groove 2018-07-28 13:28:05 +02:00
parent 9299abaf9b
commit 7e6e17f410
3 changed files with 14 additions and 14 deletions

View File

@ -249,10 +249,10 @@ int test_vec4_operators()
glm::ivec4 B(4.0f, 4.0f, 6.0f, 8.0f); glm::ivec4 B(4.0f, 4.0f, 6.0f, 8.0f);
B /= A; B /= A;
Error += B == glm::ivec4(4, 2, 2, 4) ? 0 : 1; Error += B == glm::ivec4(4, 2, 2, 2) ? 0 : 1;
B /= 2; B /= 2;
Error += B == glm::ivec4(2, 1, 1, 2) ? 0 : 1; Error += B == glm::ivec4(2, 1, 1, 1) ? 0 : 1;
} }
{ {
glm::ivec4 B(2); glm::ivec4 B(2);
@ -443,7 +443,7 @@ int test_vec4_simd()
int main() int main()
{ {
int Error(0); int Error = 0;
Error += test_vec4_ctor(); Error += test_vec4_ctor();
Error += test_bvec4_ctor(); Error += test_bvec4_ctor();

View File

@ -161,8 +161,8 @@ static int test_vec3_operators()
int Error = 0; int Error = 0;
{ {
glm::ivec3 A(1.0f); glm::ivec3 A(1);
glm::ivec3 B(1.0f); glm::ivec3 B(1);
bool R = A != B; bool R = A != B;
bool S = A == B; bool S = A == B;
@ -251,10 +251,10 @@ static int test_vec3_operators()
Error += B == glm::ivec3(2, 1, 1) ? 0 : 1; Error += B == glm::ivec3(2, 1, 1) ? 0 : 1;
} }
{ {
glm::ivec3 B(2.0f); glm::ivec3 B(2);
B /= B.y; B /= B.y;
Error += B == glm::ivec3(1.0f) ? 0 : 1; Error += B == glm::ivec3(1) ? 0 : 1;
} }
{ {
@ -423,7 +423,7 @@ int test_vec3_swizzle_operators()
q = (u.zyx + v.zyx).zyx; Error += (q == (u + v)) ? 0 : 1; q = (u.zyx + v.zyx).zyx; Error += (q == (u + v)) ? 0 : 1;
q = (u.xyz - v.xyz); Error += (q == (u - v)) ? 0 : 1; q = (u.xyz - v.xyz); Error += (q == (u - v)) ? 0 : 1;
q = (u.xyz * v.xyz); Error += (q == (u * v)) ? 0 : 1; q = (u.xyz * v.xyz); Error += (q == (u * v)) ? 0 : 1;
q = (u.xxx * v.xxx); Error += (q == glm::vec3(u.x * v.x)) ? 0 : 1; q = (u.xxx * v.xxx); Error += (q == glm::ivec3(u.x * v.x)) ? 0 : 1;
q = (u.xyz / v.xyz); Error += (q == (u / v)) ? 0 : 1; q = (u.xyz / v.xyz); Error += (q == (u / v)) ? 0 : 1;
// vec, swizzle binary operators // vec, swizzle binary operators
@ -499,13 +499,13 @@ int test_vec3_swizzle_partial()
# if GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR # if GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR
{ {
glm::ivec3 const A(1, 2, 3); glm::ivec3 const A(1, 2, 3);
glm::ivec3 B(A.xy, 3.0f); glm::ivec3 B(A.xy, 3);
Error += A == B ? 0 : 1; Error += A == B ? 0 : 1;
} }
{ {
glm::ivec3 const A(1, 2, 3); glm::ivec3 const A(1, 2, 3);
glm::ivec3 const B(1.0f, A.yz); glm::ivec3 const B(1, A.yz);
Error += A == B ? 0 : 1; Error += A == B ? 0 : 1;
} }

View File

@ -308,8 +308,8 @@ static int test_operators()
int Error = 0; int Error = 0;
{ {
glm::ivec4 A(1.0f); glm::ivec4 A(1);
glm::ivec4 B(1.0f); glm::ivec4 B(1);
bool R = A != B; bool R = A != B;
bool S = A == B; bool S = A == B;
@ -398,10 +398,10 @@ static int test_operators()
Error += B == glm::ivec4(2, 1, 2, 1) ? 0 : 1; Error += B == glm::ivec4(2, 1, 2, 1) ? 0 : 1;
} }
{ {
glm::ivec4 B(2.0f); glm::ivec4 B(2);
B /= B.y; B /= B.y;
Error += B == glm::ivec4(1.0f) ? 0 : 1; Error += B == glm::ivec4(1) ? 0 : 1;
} }
{ {