mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Graft fix for issue 212
This commit is contained in:
parent
79f6d7082c
commit
37e7b6d649
@ -173,7 +173,12 @@ int test_Snorm3x10_1x2()
|
||||
glm::vec4 v0 = glm::unpackSnorm3x10_1x2(p0);
|
||||
glm::uint32 p1 = glm::packSnorm3x10_1x2(v0);
|
||||
glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p1);
|
||||
Error += glm::all(glm::equal(v0, v1)) ? 0 : 1;
|
||||
|
||||
printf("Snorm3x10_1x2: p0: %x; v0: %3.2f, %3.2f, %3.2f, %3.2f; p1: %x; v1: %3.2f, %3.2f, %3.2f, %3.2f\n",
|
||||
p0, v0.x, v0.y, v0.z, v0.w,
|
||||
p1, v1.x, v1.y, v1.z, v1.w);
|
||||
|
||||
Error += glm::all(glm::epsilonEqual(v0, v1, 0.01f)) ? 0 : 1;
|
||||
}
|
||||
|
||||
return Error;
|
||||
@ -197,7 +202,12 @@ int test_Unorm3x10_1x2()
|
||||
glm::vec4 v0 = glm::unpackUnorm3x10_1x2(p0);
|
||||
glm::uint32 p1 = glm::packUnorm3x10_1x2(v0);
|
||||
glm::vec4 v1 = glm::unpackUnorm3x10_1x2(p1);
|
||||
Error += glm::all(glm::equal(v0, v1)) ? 0 : 1;
|
||||
|
||||
printf("Unorm3x10_1x2: p0: %x; v0: %3.2f, %3.2f, %3.2f, %3.2f; p1: %x; v1: %3.2f, %3.2f, %3.2f, %3.2f\n",
|
||||
p0, v0.x, v0.y, v0.z, v0.w,
|
||||
p1, v1.x, v1.y, v1.z, v1.w);
|
||||
|
||||
Error += glm::all(glm::epsilonEqual(v0, v1, 0.001f)) ? 0 : 1;
|
||||
}
|
||||
|
||||
return Error;
|
||||
@ -673,6 +683,7 @@ int main()
|
||||
Error += test_F3x9_E1x5();
|
||||
Error += test_Snorm3x10_1x2();
|
||||
Error += test_Unorm3x10_1x2();
|
||||
|
||||
Error += test_I3x10_1x2();
|
||||
Error += test_U3x10_1x2();
|
||||
Error += test_Half1x16();
|
||||
|
Loading…
Reference in New Issue
Block a user